mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-13 09:50:45 -05:00
Add build type detection and archive build step
This commit is contained in:
parent
abb253bd1e
commit
fd6126f8e4
@ -49,13 +49,32 @@ jobs:
|
|||||||
echo "Tags: ${{ steps.cache-keys.outputs.tags }}"
|
echo "Tags: ${{ steps.cache-keys.outputs.tags }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Build Type
|
||||||
|
id: build-type
|
||||||
|
run: |
|
||||||
|
TAGS="${{ steps.cache-keys.outputs.tags }}"
|
||||||
|
RELEASE_BUILD_REGEX='^(v?\d+\.\d+\.\d+)$'
|
||||||
|
BLEEDING_BUILD_REGEX='^(v?\d+\.\d+\.\d+-(BE)(?:-[^-]+)?)$'
|
||||||
|
if [[ "$TAGS" =~ $RELEASE_BUILD_REGEX ]]; then
|
||||||
|
echo "Build type: release"
|
||||||
|
echo "::set-output name=build_type::release"
|
||||||
|
elif [[ "$TAGS" =~ $BLEEDING_BUILD_REGEX ]]; then
|
||||||
|
echo "Build type: bleeding"
|
||||||
|
echo "::set-output name=build_type::bleeding"
|
||||||
|
else
|
||||||
|
echo "Build type: debug"
|
||||||
|
echo "::set-output name=build_type::debug"
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Build Cache
|
- name: Build Cache
|
||||||
id: build-cache
|
id: build-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ./server/project/build
|
path: ./server/project/build
|
||||||
key: build-${{ steps.cache-keys.outputs.commit_hash }}-${{ steps.cache-keys.outputs.tags }}
|
key: build-${{ steps.cache-keys.outputs.commit_hash }}-${{ steps.cache-keys.outputs.tags }}-${{ steps.build-type.outputs.build_type }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
|
build-${{ steps.cache-keys.outputs.commit_hash }}-${{ steps.cache-keys.outputs.tags }}-
|
||||||
build-${{ steps.cache-keys.outputs.commit_hash }}-
|
build-${{ steps.cache-keys.outputs.commit_hash }}-
|
||||||
build-
|
build-
|
||||||
|
|
||||||
@ -69,8 +88,13 @@ jobs:
|
|||||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cd ./server/project
|
cd ./server/project
|
||||||
npm run build:bleeding
|
BUILD_TYPE="${{ steps.build-type.outputs.build_type }}"
|
||||||
|
echo "Running build for $BUILD_TYPE"
|
||||||
|
npm run build:$BUILD_TYPE
|
||||||
|
|
||||||
# find build type
|
- name: Archive Build
|
||||||
# npm install
|
uses: actions/upload-artifact@v4
|
||||||
# npm build:type
|
with:
|
||||||
|
name: build-artifacts
|
||||||
|
path: ./server/project/build/
|
||||||
|
overwrite: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user