diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b4dccb12c3..6ed4691aebd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,49 +61,55 @@ 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 + - name: Create Release + id: create_release run: | - ./scripts/cdn.sh $BUNNY_BUCKET_DESTINATION ./build-modules - ./scripts/cdn.sh $BUNNY_BUCKET_DESTINATION ./${{ env.BUILD_DIR_NAME }} + gh release create ${{ github.ref }} ${{ env.STABLE_ZIP_NAME }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - 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 - - name: Delete old GitHub Pre-Release assets - uses: mknejp/delete-release-assets@v1 - with: - token: ${{ github.token }} - tag: ${{ env.STABLE_PRE_RELEASE_TAG }} - assets: "*" - fail-if-no-assets: false - - name: Upload aicraft package to GitHub Pre-Release Assets - uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ env.STABLE_PRE_RELEASE_ID }}/assets{?name,label} - asset_path: ./${{ env.BUILD_DIR_NAME }}/${{ env.STABLE_ZIP_NAME }} - asset_name: ${{ env.STABLE_ZIP_NAME }} - asset_content_type: application/zip - - name: Upload fragments to GitHub Pre-Release Assets - uses: dwenegar/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - release_id: ${{ env.STABLE_PRE_RELEASE_ID }} - assets_path: ./build-modules/ - - name: Update GitHub Pre-Release Body - run: | - curl --request PATCH \ - --url 'https://api.github.com/repos/${{ github.repository }}/releases/${{ env.STABLE_PRE_RELEASE_ID }}' \ - --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "body": "This pre-release has its asset updated on every release\nLast updated on ${{ env.BUILT_DATE_TIME }} from commit ${{ github.sha }}\nThis link will always point to the latest stable build: https://github.com/${{ github.repository }}/releases/download/${{ env.STABLE_PRE_RELEASE_TAG }}/${{ env.STABLE_ZIP_NAME }}" - }' + #- name: Delete old GitHub Pre-Release assets + # uses: mknejp/delete-release-assets@v1 + # with: + # token: ${{ github.token }} + # tag: ${{ env.STABLE_PRE_RELEASE_TAG }} + # assets: "*" + # fail-if-no-assets: false + #- name: Upload aicraft package to GitHub Pre-Release Assets + # uses: actions/upload-release-asset@v1.0.2 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ env.STABLE_PRE_RELEASE_ID }}/assets{?name,label} + # asset_path: ./${{ env.BUILD_DIR_NAME }}/${{ env.STABLE_ZIP_NAME }} + # asset_name: ${{ env.STABLE_ZIP_NAME }} + # asset_content_type: application/zip + #- name: Upload fragments to GitHub Pre-Release Assets + # uses: dwenegar/upload-release-assets@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # release_id: ${{ env.STABLE_PRE_RELEASE_ID }} + # assets_path: ./build-modules/ + # - name: Update GitHub Pre-Release Body + # run: | + # curl --request PATCH \ + # --url 'https://api.github.com/repos/${{ github.repository }}/releases/${{ env.STABLE_PRE_RELEASE_ID }}' \ + # --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + # --header 'Content-Type: application/json' \ + # --data-raw '{ + # "body": "This pre-release has its asset updated on every release\nLast updated on ${{ env.BUILT_DATE_TIME }} from commit ${{ github.sha }}\nThis link will always point to the latest stable build: https://github.com/${{ github.repository }}/releases/download/${{ env.STABLE_PRE_RELEASE_TAG }}/${{ env.STABLE_ZIP_NAME }}" + # }' diff --git a/fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs b/fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs index c6fed2625c3..4363c028565 100644 --- a/fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs +++ b/fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs @@ -7,7 +7,7 @@ export function getInstrumentsIgniterTasks() { const baseInstruments = fs.readdirSync(join(Directories.instruments, 'src'), { withFileTypes: true }) .filter((d) => d.isDirectory() && fs.existsSync(join(Directories.instruments, 'src', d.name, 'config.json'))); - return baseInstruments.map((instrument) => new TaskOfTasks(`${instrument.name}`, [new ExecTask( + return baseInstruments.map((instrument) => new ExecTask( instrument.name, `cd fbw-a32nx && mach build -f ${instrument.name}`, [ @@ -15,6 +15,6 @@ export function getInstrumentsIgniterTasks() { 'fbw-a32nx/src/systems/instruments/src/Common', join('fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX', instrument.name), ], - ), - new ExecTask(`${instrument.name}_tsc`, `tsc -noemit -p ${join(Directories.instruments, 'src', instrument.name, 'tsconfig.json')} 1>&2`)])); + )); + // new ExecTask(`${instrument.name}_tsc`, `tsc -noemit -p ${join(Directories.instruments, 'src', instrument.name, 'tsconfig.json')} 1>&2`)])); }