-
Notifications
You must be signed in to change notification settings - Fork 814
95 lines (82 loc) · 2.68 KB
/
build-release.yml
File metadata and controls
95 lines (82 loc) · 2.68 KB
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
permissions:
contents: read
name: Build release
on:
push:
branches:
- master
- dev
tags:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Disable git core.autocrlf
run: git config --global core.autocrlf false
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node 22.17.1
uses: actions/setup-node@v4
with:
node-version: '22.17.1'
- name: Setup node_modules cache
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install package dependencies
run: yarn install
- name: Install build dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xz-utils libarchive-tools squashfs-tools
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build app/
run: yarn build
env:
NODE_ENV: production
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
- name: Setup gcloud (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: google-github-actions/setup-gcloud@v2
with:
version: '>=536.0.0'
- name: Authenticate to Google Cloud (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_JSON }}
- uses: ./workspaces/desktop-release-action
with:
mac_csc_link: ${{ secrets.MAC_CSC_LINK }}
mac_csc_key_password: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
mac_apple_id: ${{ secrets.APPLEID }}
mac_apple_id_password: ${{ secrets.APPLEIDPASS }}
mac_asc_provider: 'S6UPZG7ZR3'
gcp_sa_json: ${{ secrets.GCP_SA_JSON }}
win_kms_key_resource: ${{ secrets.WIN_KMS_KEY_RESOURCE }}
win_user_crt: ${{ secrets.WIN_USER_CRT }}
win_intermediate_crt: ${{ secrets.WIN_INTERMEDIATE_CRT }}
win_root_crt: ${{ secrets.WIN_ROOT_CRT }}
github_token: ${{ secrets.GH_TOKEN }}
snapcraft_token: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}