Skip to content

Commit 1af534a

Browse files
chore: Use yarn in package script
1 parent ad3ed1d commit 1af534a

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/npm-publish.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3-
41
name: Node.js Package
52

63
on:
@@ -14,9 +11,10 @@ jobs:
1411
- uses: actions/checkout@v2
1512
- uses: actions/setup-node@v2
1613
with:
17-
node-version: 12
18-
- run: npm ci
19-
- run: npm test
14+
node-version: 18
15+
cache: "yarn"
16+
- run: yarn install --frozen-lockfile
17+
- run: yarn test
2018

2119
publish-npm:
2220
needs: build
@@ -25,10 +23,10 @@ jobs:
2523
- uses: actions/checkout@v2
2624
- uses: actions/setup-node@v2
2725
with:
28-
node-version: 12
29-
registry-url: https://registry.npmjs.org/
30-
- run: npm ci
31-
- run: npm publish
26+
node-version: 18
27+
cache: "yarn"
28+
- run: yarn install --frozen-lockfile
29+
- run: yarn publish
3230
env:
3331
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
3432

@@ -39,9 +37,9 @@ jobs:
3937
- uses: actions/checkout@v2
4038
- uses: actions/setup-node@v2
4139
with:
42-
node-version: 12
43-
registry-url: https://npm.pkg.github.com/
44-
- run: npm ci
45-
- run: npm publish
40+
node-version: 18
41+
cache: "yarn"
42+
- run: yarn install --frozen-lockfile
43+
- run: yarn publish
4644
env:
4745
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)