Skip to content

Update release to v23.10.28.0 #116

Update release to v23.10.28.0

Update release to v23.10.28.0 #116

Workflow file for this run

name: igor-experimental
on:
push:
branches:
- igor-experimental-23-10-28
jobs:
build:
# Prevent running this on forks
if: github.repository_owner == 'igor8518'
runs-on: ubuntu-latest
env:
A32NX_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
EXPERIMENTAL_PRE_RELEASE_ID: 98150347
EXPERIMENTAL_PRE_RELEASE_TAG: A32NX-igor-v-ex
EXPERIMENTAL_ZIP_NAME: A32NX-igor-v-ex.zip
BUILD_DIR_NAME: experimental
# https://api.github.com/repos/igor8518/a32nx/releases
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo A32NX_PRODUCTION_BUILD=1 >> fbw-a32nx/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID }}\" >> fbw-a32nx/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET }}\" >> fbw-a32nx/.env
echo CHARTFOX_SECRET=\"${{ secrets.CHARTFOX_SECRET }}\" >> fbw-a32nx/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> fbw-a32nx/.env
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build_a32nx.sh --no-tty -j 4
- name: Build ZIP files
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.EXPERIMENTAL_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
cd ../../
- name: Delete old GitHub Pre-Release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: ${{ env.EXPERIMENTAL_PRE_RELEASE_TAG }}
assets: "*"
fail-if-no-assets: false
- name: Upload aircraft 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.EXPERIMENTAL_PRE_RELEASE_ID }}/assets{?name,label}
asset_path: ./${{ env.BUILD_DIR_NAME }}/${{ env.EXPERIMENTAL_ZIP_NAME }}
asset_name: ${{ env.EXPERIMENTAL_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.EXPERIMENTAL_PRE_RELEASE_ID }}
assets_path: ./fbw-a32nx/out/build-modules
- name: Update GitHub Pre-Release Body
run: |
curl --request PATCH \
--url 'https://api.github.com/repos/${{ github.repository }}/releases/${{ env.EXPERIMENTAL_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 commit to the experimental branch\nLast updated on ${{ env.BUILT_DATE_TIME }} from commit ${{ github.sha }}\nThis link will always point to the latest experimental build: https://github.com/${{ github.repository }}/releases/download/${{ env.EXPERIMENTAL_PRE_RELEASE_TAG }}/${{ env.EXPERIMENTAL_ZIP_NAME }}"
}'