-
-
Notifications
You must be signed in to change notification settings - Fork 33
97 lines (95 loc) · 2.95 KB
/
nodejs.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Node CD
on:
push:
tags:
- '*'
branches:
- master
pull_request:
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- { os: macos-11, arch: x64 }
- { os: ubuntu-latest, arch: x64 }
- { os: windows-2019, arch: x64 }
- { os: windows-2019, arch: ia32 }
variant:
- main
- icca
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16.17.X
- name: npm ci no scripts
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
retry_on: error
retry_wait_seconds: 0
command: npm ci --ignore-scripts
env:
npm_config_arch: ${{matrix.config.arch}}
- name: Remove native deps
run: |
npm run remove-native-deps
- name: post install script
run: |
npm run postinstall
- name: Lint
run: |
npm run lint
- name: Build frontend
run: |
npm run build
env:
CI: true
- name: Publish
# Currently undocumented, but if it is None or Dependabot (e.g. PR from a fork) then secrets are not defined
if: github.secret_source == 'Actions'
run: |
npm run dist -- --${{matrix.config.arch}}
env:
ARCH: ${{matrix.config.arch}}
DEBUG: electron-builder
CI: true
GITHUB_CI_REF: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
MAPEO_VARIANT: ${{ matrix.variant }}
- name: Publish (unsigned)
# Currently undocumented, but if it is None (e.g. PR from a fork) then secrets are not defined
if: github.secret_source != 'Actions'
run: |
npm run dist -- --${{matrix.config.arch}}
env:
ARCH: ${{matrix.config.arch}}
CI: true
MAPEO_VARIANT: ${{ matrix.variant }}
- name: Cleanup artifacts
run: |
npm run remove-ci-artifacts -- ${{ matrix.variant }}
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: '${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.variant }}'
path: dist/${{ matrix.variant }}