forked from flybywiresim/aircraft
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (55 loc) · 2.45 KB
/
ingamepanels-checklist-fix.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
56
name: InGamePanels Checklist Fix
on:
push:
branches:
- master
paths:
- 'fbw-ingamepanels-checklist-fix/**'
- 'scripts/build_ingamepanels_checklist_fix.js'
- 'scripts/build_ingamepanels_checklist_fix.sh'
- 'igniter.config.mjs'
- 'package.json'
- 'package-lock.json'
jobs:
build-ingamepanels-checklist-fix:
# Prevent running this on forks
if: github.repository_owner == 'flybywiresim'
name: 'Build InGamePanels Checklist Fix'
runs-on: ubuntu-latest
env:
FBW_PRODUCTION_BUILD: 1
MASTER_ZIP_NAME: ingamepanels-checklist-fix-master.zip
BUILD_DIR_NAME: master
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 FBW_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
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
- name: Build In-Game Panels Checklist Fix
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build_ingamepanels_checklist_fix.sh --no-tty -j 4
- name: Build ZIP files
run: |
./scripts/dev-env/run.sh node ./scripts/fragment-ingamepanels-checklist-fix.js
cp ./fbw-ingamepanels-checklist-fix/out/build-modules/modules.json ./fbw-ingamepanels-checklist-fix/out/flybywire-ingamepanels-checklist-fix/install.json
./scripts/dev-env/run.sh node ./scripts/install-source-ingamepanels-checklist-fix.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./fbw-ingamepanels-checklist-fix/out/
zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.MASTER_ZIP_NAME }} ./flybywire-ingamepanels-checklist-fix/
cd ../../
- name: Upload to CloudFlare CDN
env:
CLOUDFLARE_BUCKET_PASSWORD: ${{ secrets.CLOUDFLARE_BUCKET_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/ingamepanels-checklist-fix/master
run: |
./scripts/cf-cdn.sh $CDN_BUCKET_DESTINATION ./fbw-ingamepanels-checklist-fix/out/build-modules