Skip to content

Commit

Permalink
revert changes and refactor release
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl committed Oct 1, 2023
1 parent d224d97 commit 425429a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 42 deletions.
84 changes: 45 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
# }'
6 changes: 3 additions & 3 deletions fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ 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}`,
[
join('fbw-a32nx/src/systems/instruments/src', instrument.name),
'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`)]));
}

0 comments on commit 425429a

Please sign in to comment.