Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: acars-package
path: 'stable.zip'
path: |
stable.zip
artifacts/aircraft.json
overwrite: true

#
Expand All @@ -80,6 +82,24 @@ jobs:
aws s3 cp stable.zip s3://acars/scripts/v8/stable.zip \
--endpoint-url https://ny-s3.storage.bunnycdn.com

# Aircraft configs publish on their own rather than inside the zip: the
# client fetches them from acars.aircraft_config_url. Versioned so a URL
# can be pinned to an exact build, plus a -latest alias to point at
# without editing Replane every release. A tag publishes under its
# version (v1.1.0 -> aircraft-1.1.0.json), anything else under the last
# five of the commit sha.
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VERSION="${GITHUB_REF#refs/tags/v}"
else
VERSION="${GITHUB_SHA: -5}"
fi

aws s3 cp artifacts/aircraft.json "s3://acars/configs/aircraft-${VERSION}.json" \
--endpoint-url https://ny-s3.storage.bunnycdn.com

aws s3 cp artifacts/aircraft.json s3://acars/configs/aircraft-latest.json \
--endpoint-url https://ny-s3.storage.bunnycdn.com

#
# Manually triggered: bump the version, tag it, and publish a GitHub release
#
Expand Down Expand Up @@ -140,6 +160,14 @@ jobs:
aws s3 cp stable.zip s3://acars/scripts/v8/stable.zip \
--endpoint-url https://ny-s3.storage.bunnycdn.com

# Same split as the publish job, but the version is already known here.
aws s3 cp artifacts/aircraft.json \
"s3://acars/configs/aircraft-${{ steps.bump.outputs.version }}.json" \
--endpoint-url https://ny-s3.storage.bunnycdn.com

aws s3 cp artifacts/aircraft.json s3://acars/configs/aircraft-latest.json \
--endpoint-url https://ny-s3.storage.bunnycdn.com

- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules/
.node_modules/
built/*
dist/
artifacts/
tests/cases/rwc/*
tests/cases/perf/*
!tests/cases/webharness/compilerToString.js
Expand Down
Loading
Loading