-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (48 loc) · 1.63 KB
/
build.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
57
58
59
60
name: Build & Deploy
on: push
jobs:
build:
runs-on: macos-latest
env:
COLLAB_SERVER: ${{secrets.COLLAB_SERVER}}
SENTRY_DSN: ${{secrets.SENTRY_DSN}}
INSIGHTS_ID: ${{secrets.INSIGHTS_ID}}
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Copy sample config
run: cp src/config/index.sample.js src/config/index.js
- name: Replace secrets
run: npm install replace -g && replace "COLLAB_SERVER" $COLLAB_SERVER src/config/index.js && replace "SENTRY_DSN" $SENTRY_DSN src/config/index.js && replace "INSIGHTS_ID" $INSIGHTS_ID src/config/index.js
- name: Installing dependencies
run: npm ci
- name: Building web app
run: npm run build
- name: Building electron renderer
run: rm -rf .parcel-cache && npm run build:desktop:renderer
- name: Building electron app
run: cd desktop && npm install && npm run make && cp out/make/zip/darwin/x64/*.zip ../dist/asblocks.zip && cd -
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Download dist
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- uses: w9jds/firebase-action@master
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}