chore: update version to 0.6.2 for exe (#136) #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- "v*" | |
- "!v*-rc*" | |
jobs: | |
build: | |
if: github.repository_owner == 'flybywiresim' | |
runs-on: windows-latest | |
env: | |
RELEASE_ZIP_NAME: fbw-simbridge.zip | |
STABLE_PRE_RELEASE_TAG: assets/stable | |
STABLE_PRE_RELEASE_ID: 69042719 | |
BUILD_DIR_NAME: release | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: set Node version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Build Local API | |
run: | | |
npm install | |
npm run build:exec | |
- name: Build ZIP File | |
run: | | |
node .\scripts\fragment.js | |
mkdir .\${{env.BUILD_DIR_NAME}} | |
Compress-Archive -Path .\build\* .\${{env.BUILD_DIR_NAME }}\${{ env.RELEASE_ZIP_NAME }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload release asset | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: .\${{env.BUILD_DIR_NAME }}\${{ env.RELEASE_ZIP_NAME }} | |
asset_name: ${{ env.RELEASE_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/simbridge/release | |
run: | | |
node scripts\cdn.js ${{ env.BUNNY_BUCKET_DESTINATION }} .\build-modules | |
- name: Upload to CloudFlare CDN | |
env: | |
CLOUDFLARE_BUCKET_PASSWORD: ${{ secrets.CLOUDFLARE_BUCKET_PASSWORD }} | |
CF_BUCKET_DESTINATION: addons/simbridge/release | |
run: | | |
node scripts\cf-cdn.js ${{ env.CF_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 | |
fail-if-no-release: false | |
- name: Upload simbridge package to GitHub Pre-Release Assets | |
uses: actions/[email protected] | |
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.RELEASE_ZIP_NAME }} | |
asset_name: ${{ env.RELEASE_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\ |