-
Notifications
You must be signed in to change notification settings - Fork 58
66 lines (58 loc) · 1.93 KB
/
electron-build-and-publish.yaml
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
61
62
63
64
65
66
name: Electron Build and Publish
on:
pull_request:
branches: [main]
# workflow_run:
# workflows: ["Release Build"]
# types: [completed]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build electron app
run: |
cd webapp
npm ci
npm run build-electron
env:
AWS_REGION: ${{ vars.AWS_REGION }}
DOMAIN_NAME: ${{ vars.DOMAIN_NAME }}
API_URL: ${{ vars.API_URL }}
COGNITO_USER_POOL_ID: ${{ vars.COGNITO_USER_POOL_ID }}
COGNITO_APP_CLIENT_ID: ${{ vars.COGNITO_APP_CLIENT_ID }}
REDIRECT_SIGN_IN: ${{ vars.REDIRECT_SIGN_IN }}
REDIRECT_SIGN_OUT: ${{ vars.REDIRECT_SIGN_OUT }}
AUTH_GUARD_REDIRECT: ${{ vars.AUTH_GUARD_REDIRECT }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ${{ vars.AWS_REGION }}
- name: Bundle and Publish electron
run: |
cd webapp
npm run bundle-electron --publish always
env:
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}
AWS_REGION: ${{ vars.AWS_REGION }}