@@ -16,17 +16,29 @@ jobs:
16
16
steps :
17
17
-
18
18
uses : actions/checkout@v3
19
- -
20
- uses : actions/setup-node@v3
19
+ - uses : actions/setup-node@v3
20
+ - uses : pnpm/action-setup@v4
21
+ name : Install pnpm
22
+ with :
23
+ version : 9.0.4
24
+ run_install : false
25
+ - name : Get pnpm store directory
26
+ shell : bash
27
+ run : |
28
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
29
+ - uses : actions/cache@v4
30
+ name : Setup pnpm cache
21
31
with :
22
- node-version : 12
23
- cache : ' npm'
32
+ path : ${{ env.STORE_PATH }}
33
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34
+ restore-keys : |
35
+ ${{ runner.os }}-pnpm-store-
24
36
-
25
- run : npm ci
37
+ run : pnpm ci
26
38
-
27
- run : npm test
39
+ run : pnpm test
28
40
-
29
- run : npm run --if-present lint
41
+ run : pnpm run --if-present lint
30
42
31
43
publish-npm :
32
44
if : github.event_name == 'push'
@@ -37,12 +49,23 @@ jobs:
37
49
uses : actions/checkout@v3
38
50
with :
39
51
fetch-depth : 0
40
- -
41
- uses : actions/setup-node@v3
52
+ - uses : actions/setup-node@v3
53
+ - uses : pnpm/action-setup@v4
54
+ name : Install pnpm
55
+ with :
56
+ version : 9.0.4
57
+ run_install : false
58
+ - name : Get pnpm store directory
59
+ shell : bash
60
+ run : |
61
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
62
+ - uses : actions/cache@v4
63
+ name : Setup pnpm cache
42
64
with :
43
- node-version : 12
44
- registry-url : https://registry.npmjs.org/
45
- cache : ' npm'
65
+ path : ${{ env.STORE_PATH }}
66
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
67
+ restore-keys : |
68
+ ${{ runner.os }}-pnpm-store-
46
69
-
47
70
name : Bump version (patch)
48
71
run : |
@@ -51,13 +74,13 @@ jobs:
51
74
[ "${NEW_COMMITS}" -gt 0 ] || exit 0
52
75
git config user.name 'github-actions[bot]'
53
76
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
54
- npm ci
55
- npm version patch
77
+ pnpm ci
78
+ pnpm version patch
56
79
git push --follow-tags
57
80
# This is required if the package has a prepare script that uses something
58
81
# in dependencies or devDependencies.
59
82
-
60
- run : npm ci
83
+ run : pnpm ci
61
84
# `npm publish` must come after `git push` otherwise there is a race
62
85
# condition: If two PRs are merged back-to-back then master/main will be
63
86
# updated with the commits from the second PR before the first PR's
@@ -69,11 +92,11 @@ jobs:
69
92
# back-to-back merges will cause the first merge's workflow to fail but
70
93
# the second's will succeed.
71
94
-
72
- run : npm publish
95
+ run : pnpm publish
73
96
env :
74
97
NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
75
98
-
76
99
name : Add package to etherpad organization
77
- run : npm access grant read-write etherpad:developers
100
+ run : pnpm access grant read-write etherpad:developers
78
101
env :
79
102
NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
0 commit comments