From 87d65399af711bca3d4bc17420b23060891b376d Mon Sep 17 00:00:00 2001 From: Saschl <19493808+Saschl@users.noreply.github.com> Date: Wed, 3 Jan 2024 00:23:12 +0100 Subject: [PATCH] fix: release action (#8277) --- .github/workflows/master.yml | 4 ++-- .github/workflows/pre-release.yml | 11 ++++------- .github/workflows/release.yml | 20 +++++++------------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index e7844f00900..d946cf9ceeb 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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 @@ -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: diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 8c3eabaff4e..4acaba8b512 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a632f211cca..5e07599b5d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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: