Skip to content

Commit

Permalink
fix: release action (flybywiresim#8277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl authored Jan 2, 2024
1 parent 1f16d82 commit 87d6539
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
MASTER_PRE_RELEASE_ID: 66067756
MASTER_PRE_RELEASE_TAG: assets/master
MASTER_ZIP_NAME: A32NX-master.zip
MASTER_ZIP_NAME: A32NX-master.7z
VMASTER_PRE_RELEASE_ID: 32243965
VMASTER_PRE_RELEASE_TAG: vmaster
BUILD_DIR_NAME: master
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
node ./scripts/install-source_a32nx.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./fbw-a32nx/out/
zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.MASTER_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
7z a -t7z -m0=lzma2 -mx=7 ../../${{ env.BUILD_DIR_NAME }}/${{ env.MASTER_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
cd ../../
- name: Upload to CloudFlare CDN
env:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
env:
A32NX_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
RELEASE_ZIP_NAME: A32NX-stable.zip
RELEASE_ZIP_NAME: A32NX-stable.7z
BUILD_DIR_NAME: stable
steps:
- name: Checkout source
Expand All @@ -29,15 +29,12 @@ jobs:
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
rm -rf fbw-a32nx/src
docker system prune -af
- name: Build ZIP file
run: |
./scripts/dev-env/run.sh node ./scripts/fragment_a32nx.js
cp ./fbw-a32nx/out/build-modules/modules.json ./fbw-a32nx/out/flybywire-aircraft-a320-neo/install.json
./scripts/dev-env/run.sh node ./scripts/install-source_a32nx.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./fbw-a32nx/out/
zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.RELEASE_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
7z a -t7z -m0=lzma2 -mx=7 ../../${{ env.BUILD_DIR_NAME }}/${{ env.RELEASE_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
cd ../..
- name: Create Release
id: create_release
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
STABLE_PRE_RELEASE_ID: 66067814
STABLE_PRE_RELEASE_TAG: assets/stable
STABLE_ZIP_NAME: A32NX-stable.zip
STABLE_ZIP_NAME: A32NX-stable.7z
BUILD_DIR_NAME: stable
steps:
- name: Checkout source
Expand All @@ -32,15 +32,17 @@ jobs:
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
rm -rf fbw-a32nx/src
docker system prune -af
- name: Build ZIP file
run: |
./scripts/dev-env/run.sh node ./scripts/fragment_a32nx.js
node ./scripts/fragment_a32nx.js
cp ./fbw-a32nx/out/build-modules/modules.json ./fbw-a32nx/out/flybywire-aircraft-a320-neo/install.json
./scripts/dev-env/run.sh node ./scripts/install-source_a32nx.js
node ./scripts/install-source_a32nx.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./fbw-a32nx/out/
zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.STABLE_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
7z a -t7z -m0=lzma2 -mx=7 ../../${{ env.BUILD_DIR_NAME }}/${{ env.STABLE_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
cd ../..
- name: Create Release
id: create_release
Expand All @@ -61,20 +63,12 @@ jobs:
asset_path: ./${{ env.BUILD_DIR_NAME }}/${{ env.STABLE_ZIP_NAME }}
asset_name: ${{ env.STABLE_ZIP_NAME }}
asset_content_type: application/zip
- name: Upload to Bunny CDN
env:
BUNNY_BUCKET_PASSWORD: ${{ secrets.BUNNY_BUCKET_PASSWORD }}
BUNNY_SECRET_TOKEN: ${{ secrets.BUNNY_SECRET_TOKEN }}
BUNNY_BUCKET_DESTINATION: addons/a32nx/stable
run: |
./scripts/cdn.sh $BUNNY_BUCKET_DESTINATION ./build-modules
./scripts/cdn.sh $BUNNY_BUCKET_DESTINATION ./${{ env.BUILD_DIR_NAME }}
- name: Upload to CloudFlare CDN
env:
CLOUDFLARE_BUCKET_PASSWORD: ${{ secrets.CLOUDFLARE_BUCKET_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/a32nx/stable
run: |
./scripts/cf-cdn.sh $CDN_BUCKET_DESTINATION ./build-modules
./scripts/cf-cdn.sh $CDN_BUCKET_DESTINATION ./fbw-a32nx/out/build-modules
- name: Delete old GitHub Pre-Release assets
uses: mknejp/delete-release-assets@v1
with:
Expand Down

0 comments on commit 87d6539

Please sign in to comment.