Skip to content

Commit 6e6edd1

Browse files
authored
feat: switch to pnpm & update runs-on versions & packages (#566)
1 parent f8a6ac2 commit 6e6edd1

File tree

13 files changed

+6407
-6767
lines changed

13 files changed

+6407
-6767
lines changed

.github/workflows/build-app.yml

Lines changed: 84 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,106 +4,148 @@ on: [push]
44

55
jobs:
66
build-macos:
7-
runs-on: macos-10.15
7+
runs-on: macos-latest
88

99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111

12-
- name: Get yarn cache
13-
id: yarn-cache
14-
run: echo "::set-output name=dir::$(yarn cache dir)"
12+
- name: Install Node.js
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version-file: .nvmrc
16+
17+
- uses: pnpm/action-setup@v2
18+
name: Install pnpm
19+
id: pnpm-install
20+
with:
21+
run_install: false
1522

16-
- uses: actions/cache@v1
23+
- name: Get pnpm store directory
24+
id: pnpm-cache
25+
shell: bash
26+
run: |
27+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
28+
29+
- uses: actions/cache@v3
30+
name: Setup pnpm cache
1731
with:
18-
path: ${{ steps.yarn-cache.outputs.dir }}
19-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
33+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
2034
restore-keys: |
21-
${{ runner.os }}-yarn-
35+
${{ runner.os }}-pnpm-store-
2236
23-
- name: Install Dependencies
24-
run: yarn install
37+
- name: Install dependencies
38+
run: pnpm install
2539

2640
- name: Build
27-
run: yarn build
41+
run: pnpm build
2842

2943
- name: Make macOS (electron-builder)
3044
env:
3145
CSC_LINK: ${{ secrets.mac_certs }}
3246
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
33-
run: yarn make:macos --publish=never -c.mac.identity=null
47+
run: pnpm make:macos --publish=never -c.mac.identity=null
3448

3549
- name: Clean up builds
3650
run: rm -rfv dist/mac-universal
3751

38-
- uses: actions/upload-artifact@v2
52+
- uses: actions/upload-artifact@v3
3953
with:
4054
name: Gitify-dist-mac
4155
path: dist/
4256

4357
build-windows:
44-
runs-on: windows-2019
58+
runs-on: windows-latest
4559

4660
steps:
47-
- uses: actions/checkout@v2
61+
- uses: actions/checkout@v3
62+
63+
- name: Install Node.js
64+
uses: actions/setup-node@v3
65+
with:
66+
node-version-file: .nvmrc
4867

49-
- name: Get yarn cache
50-
id: yarn-cache
51-
run: echo "::set-output name=dir::$(yarn cache dir)"
68+
- uses: pnpm/action-setup@v2
69+
name: Install pnpm
70+
id: pnpm-install
71+
with:
72+
run_install: false
73+
74+
- name: Get pnpm store directory
75+
id: pnpm-cache
76+
shell: bash
77+
run: |
78+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
5279
53-
- uses: actions/cache@v1
80+
- uses: actions/cache@v3
81+
name: Setup pnpm cache
5482
with:
55-
path: ${{ steps.yarn-cache.outputs.dir }}
56-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
83+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
84+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
5785
restore-keys: |
58-
${{ runner.os }}-yarn-
86+
${{ runner.os }}-pnpm-store-
5987
60-
- name: Install Dependencies
61-
run: yarn install
88+
- name: Install dependencies
89+
run: pnpm install
6290

6391
- name: Build
64-
run: yarn build
92+
run: pnpm build
6593

6694
- name: Make Windows (electron-builder)
67-
run: yarn make:win --publish=never
95+
run: pnpm make:win --publish=never
6896

6997
- name: Clean up builds
7098
run: Remove-Item dist/win-unpacked -Recurse
7199

72-
- uses: actions/upload-artifact@v1
100+
- uses: actions/upload-artifact@v3
73101
with:
74102
name: Gitify-dist-win
75103
path: dist
76104

77105
build-linux:
78-
runs-on: ubuntu-18.04
106+
runs-on: ubuntu-latest
79107

80108
steps:
81-
- uses: actions/checkout@v2
109+
- uses: actions/checkout@v3
110+
111+
- name: Install Node.js
112+
uses: actions/setup-node@v3
113+
with:
114+
node-version-file: .nvmrc
115+
116+
- uses: pnpm/action-setup@v2
117+
name: Install pnpm
118+
id: pnpm-install
119+
with:
120+
run_install: false
82121

83-
- name: Get yarn cache
84-
id: yarn-cache
85-
run: echo "::set-output name=dir::$(yarn cache dir)"
122+
- name: Get pnpm store directory
123+
id: pnpm-cache
124+
shell: bash
125+
run: |
126+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
86127
87-
- uses: actions/cache@v1
128+
- uses: actions/cache@v3
129+
name: Setup pnpm cache
88130
with:
89-
path: ${{ steps.yarn-cache.outputs.dir }}
90-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
131+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
132+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
91133
restore-keys: |
92-
${{ runner.os }}-yarn-
134+
${{ runner.os }}-pnpm-store-
93135
94-
- name: Install Dependencies
95-
run: yarn install
136+
- name: Install dependencies
137+
run: pnpm install
96138

97139
- name: Build
98-
run: yarn build
140+
run: pnpm build
99141

100142
- name: Make Linux (electron-builder)
101-
run: yarn make:linux --publish=never
143+
run: pnpm make:linux --publish=never
102144

103145
- name: Clean up builds
104146
run: rm -rfv dist/linux-unpacked
105147

106-
- uses: actions/upload-artifact@v1
148+
- uses: actions/upload-artifact@v3
107149
with:
108150
name: Gitify-dist-linux
109151
path: dist

.github/workflows/release.yml

Lines changed: 81 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,44 @@ on:
77

88
jobs:
99
release-macos:
10-
runs-on: macos-10.15
10+
runs-on: macos-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414

15-
- name: Get yarn cache
16-
id: yarn-cache
17-
run: echo "::set-output name=dir::$(yarn cache dir)"
15+
- name: Install Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version-file: .nvmrc
19+
20+
- uses: pnpm/action-setup@v2
21+
name: Install pnpm
22+
id: pnpm-install
23+
with:
24+
run_install: false
1825

19-
- uses: actions/cache@v1
26+
- name: Get pnpm store directory
27+
id: pnpm-cache
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
31+
32+
- uses: actions/cache@v3
33+
name: Setup pnpm cache
2034
with:
21-
path: ${{ steps.yarn-cache.outputs.dir }}
22-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
2337
restore-keys: |
24-
${{ runner.os }}-yarn-
38+
${{ runner.os }}-pnpm-store-
2539
26-
- name: Install Dependencies
27-
run: yarn install
40+
- name: Install dependencies
41+
run: pnpm install
2842

2943
- name: Build
3044
env:
3145
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
3246
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
33-
run: yarn build
47+
run: pnpm build
3448

3549
- name: Publish macOS (electron-builder)
3650
env:
@@ -40,66 +54,94 @@ jobs:
4054
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
4155
GH_TOKEN: ${{ secrets.gh_token }}
4256
NOTARIZE: true
43-
run: yarn make:macos --publish onTagOrDraft
57+
run: pnpm make:macos --publish onTagOrDraft
4458

4559
release-windows:
46-
runs-on: windows-2019
60+
runs-on: windows-latest
4761

4862
steps:
49-
- uses: actions/checkout@v2
63+
- uses: actions/checkout@v3
64+
65+
- name: Install Node.js
66+
uses: actions/setup-node@v3
67+
with:
68+
node-version-file: .nvmrc
5069

51-
- name: Get yarn cache
52-
id: yarn-cache
53-
run: echo "::set-output name=dir::$(yarn cache dir)"
70+
- uses: pnpm/action-setup@v2
71+
name: Install pnpm
72+
id: pnpm-install
73+
with:
74+
run_install: false
75+
76+
- name: Get pnpm store directory
77+
id: pnpm-cache
78+
shell: bash
79+
run: |
80+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
5481
55-
- uses: actions/cache@v1
82+
- uses: actions/cache@v3
83+
name: Setup pnpm cache
5684
with:
57-
path: ${{ steps.yarn-cache.outputs.dir }}
58-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
85+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
86+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
5987
restore-keys: |
60-
${{ runner.os }}-yarn-
88+
${{ runner.os }}-pnpm-store-
6189
62-
- name: Install Dependencies
63-
run: yarn install
90+
- name: Install dependencies
91+
run: pnpm install
6492

6593
- name: Build
6694
env:
6795
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
6896
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
69-
run: yarn build
97+
run: pnpm build
7098

7199
- name: Publish Windows (electron-builder)
72100
env:
73101
GH_TOKEN: ${{ secrets.gh_token }}
74-
run: yarn make:win --publish onTagOrDraft
102+
run: pnpm make:win --publish onTagOrDraft
75103

76104
release-linux:
77-
runs-on: ubuntu-18.04
105+
runs-on: ubuntu-latest
78106

79107
steps:
80-
- uses: actions/checkout@v2
108+
- uses: actions/checkout@v3
109+
110+
- name: Install Node.js
111+
uses: actions/setup-node@v3
112+
with:
113+
node-version-file: .nvmrc
114+
115+
- uses: pnpm/action-setup@v2
116+
name: Install pnpm
117+
id: pnpm-install
118+
with:
119+
run_install: false
81120

82-
- name: Get yarn cache
83-
id: yarn-cache
84-
run: echo "::set-output name=dir::$(yarn cache dir)"
121+
- name: Get pnpm store directory
122+
id: pnpm-cache
123+
shell: bash
124+
run: |
125+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
85126
86-
- uses: actions/cache@v1
127+
- uses: actions/cache@v3
128+
name: Setup pnpm cache
87129
with:
88-
path: ${{ steps.yarn-cache.outputs.dir }}
89-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
130+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
131+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
90132
restore-keys: |
91-
${{ runner.os }}-yarn-
133+
${{ runner.os }}-pnpm-store-
92134
93-
- name: Install Dependencies
94-
run: yarn install
135+
- name: Install dependencies
136+
run: pnpm install
95137

96138
- name: Build
97139
env:
98140
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
99141
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
100-
run: yarn build
142+
run: pnpm build
101143

102144
- name: Publish Linuxs (electron-builder)
103145
env:
104146
GH_TOKEN: ${{ secrets.gh_token }}
105-
run: yarn make:linux --publish onTagOrDraft
147+
run: pnpm make:linux --publish onTagOrDraft

0 commit comments

Comments
 (0)