forked from flybywiresim/aircraft
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 2.08 KB
/
experimental.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: experimental
on:
push:
branches:
- experimental
jobs:
build:
# Prevent running this on forks
if: github.repository_owner == 'flybywiresim'
runs-on: ubuntu-latest
env:
A32NX_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
MASTER_ZIP_NAME: A32NX-experimental.zip
BUILD_DIR_NAME: experimental
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 >> .env
echo CLIENT_ID=${{ secrets.NAVIGRAPH_CLIENT_ID }} >> .env
echo CLIENT_SECRET=${{ secrets.NAVIGRAPH_CLIENT_SECRET }} >> .env
echo CHARTFOX_SECRET=${{ secrets.CHARTFOX_SECRET }} >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
- name: Build ZIP files
run: |
./scripts/dev-env/run.sh node ./scripts/fragment.js
mkdir ./${{ env.BUILD_DIR_NAME }}
zip -r ./${{ env.BUILD_DIR_NAME }}/${{ env.MASTER_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
- 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/experimental
run: ./scripts/cdn.sh $BUNNY_BUCKET_DESTINATION
- name: Upload to DigitalOcean CDN
uses: LibreTexts/do-space-sync-action@master
with:
args: --acl public-read
env:
SOURCE_DIR: ./${{ env.BUILD_DIR_NAME }}
DEST_DIR: ${{ env.BUILD_DIR_NAME }}
SPACE_NAME: ${{ secrets.CDN_SPACE_NAME }}
SPACE_REGION: ${{ secrets.CDN_SPACE_REGION }}
SPACE_ACCESS_KEY_ID: ${{ secrets.CDN_SPACE_ACCESS_KEY_ID }}
SPACE_SECRET_ACCESS_KEY: ${{ secrets.CDN_SPACE_SECRET_ACCESS_KEY }}