From 0a0616491f6f52a83d56fa2aa900453d0c09c762 Mon Sep 17 00:00:00 2001 From: Denis Freund Date: Thu, 16 Nov 2023 10:27:56 +0100 Subject: [PATCH] chore: add build release file fix --- .github/workflows/development.yml | 36 +++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index f192260b3..97b10d91e 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -12,6 +12,8 @@ jobs: A32NX_INSTRUMENTS_BUILD_WORKERS: 2 ZIP_NAME: headwindsim-aircraft-a330-300-dev.zip BUILD_DIR_NAME: development + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/a333x/development steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main @@ -58,11 +60,15 @@ jobs: zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.ZIP_NAME }} ./headwindsim-aircraft-a330-300/ cd ../../ - name: Upload to CloudFlare CDN - env: - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/a333x/development run: | ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/build-modules + - name: Upload Release Config to CloudFlare CDN + run: | + mkdir -p ./build-a333x/out/config + echo "releases:" >> ./build-a333x/out/config/releases.yaml + echo " - name: $GITHUB_REF_NAME" >> ./build-a333x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a333x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/config build-a339x: runs-on: ubuntu-latest env: @@ -70,6 +76,8 @@ jobs: A32NX_INSTRUMENTS_BUILD_WORKERS: 2 ZIP_NAME: headwindsim-aircraft-a330-900-dev.zip BUILD_DIR_NAME: development + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/a339x/development steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main @@ -116,11 +124,15 @@ jobs: zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.ZIP_NAME }} ./headwindsim-aircraft-a330-900/ cd ../../ - name: Upload to CloudFlare CDN - env: - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/a339x/development run: | ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/build-modules + - name: Upload Release Config to CloudFlare CDN + run: | + mkdir -p ./build-a339x/out/config + echo "releases:" >> ./build-a339x/out/config/releases.yaml + echo " - name: $GITHUB_REF_NAME" >> ./build-a339x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a339x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/config build-su95x: runs-on: ubuntu-latest env: @@ -128,6 +140,8 @@ jobs: A32NX_INSTRUMENTS_BUILD_WORKERS: 2 ZIP_NAME: headwindsim-aircraft-su100-95-dev.zip BUILD_DIR_NAME: development + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/su95x/development steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main @@ -174,8 +188,12 @@ jobs: zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.ZIP_NAME }} ./headwindsim-aircraft-su100-95/ cd ../../ - name: Upload to CloudFlare CDN - env: - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/su95x/development run: | ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/build-modules + - name: Upload Release Config to CloudFlare CDN + run: | + mkdir -p ./build-su95x/out/config + echo "releases:" >> ./build-su95x/out/config/releases.yaml + echo " - name: $GITHUB_REF_NAME" >> ./build-su95x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-su95x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/config