This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 73
88 lines (74 loc) · 2.65 KB
/
publish-windows.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
name: Publish (Windows)
# Only allow manual run
on: workflow_dispatch
jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019]
steps:
- name: Checkout git repo
uses: actions/checkout@v1
- name: Install Node, NPM
uses: actions/setup-node@v1
with:
node-version: '14.18.0'
- name: Setup yarn
run: npm install -g yarn
- name: Set msvs_version
run: npm config set msvs_version "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
- name: Test
run: echo "$(npm config get msvs_version)"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install `src/` dependencies
uses: nick-invision/[email protected]
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: |
cd src && yarn --frozen-lockfile --ignore-scripts --network-concurrency 1 --network-timeout 300000
on_retry_command: npm cache clean --force && yarn cache clean --all
shell: cmd
- name: Install dependencies
uses: nick-invision/[email protected]
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: |
yarn install --frozen-lockfile --ignore-scripts --prefer-offline --network-concurrency 1 --network-timeout 300000
on_retry_command: npm cache clean --force && yarn cache clean --all
shell: cmd
- name: Install dependencies with scripts
uses: nick-invision/[email protected]
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: |
yarn install --frozen-lockfile --prefer-offline --network-concurrency 1 --network-timeout 300000
on_retry_command: npm cache clean --force && yarn cache clean --all
shell: cmd
- name: Publish releases
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
uses: nick-invision/[email protected]
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: |
yarn postinstall && yarn build && yarn electron-builder --publish always --win
on_retry_command: npm cache clean --force && yarn cache clean --all
shell: cmd