Skip to content

Commit 3b19f0e

Browse files
update publish pipeline
1 parent 5f1e156 commit 3b19f0e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/npm-publish-github-packages.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,20 @@ jobs:
2222
with:
2323
node-version: '20.x'
2424
registry-url: 'https://registry.npmjs.org'
25-
- run: npm i
26-
- run: npm pack
27-
- run: npm publish --provenance --access public
25+
cache: 'yarn'
26+
27+
# Use Yarn instead of npm
28+
- name: Enable corepack (Yarn)
29+
run: corepack enable
30+
31+
- name: Install dependencies
32+
run: yarn install --immutable
33+
34+
- name: Build package tarball with Yarn
35+
run: yarn pack --out package.tgz
36+
37+
# Still use npm to publish the already-generated tarball
38+
- name: Publish to npm
39+
run: npm publish package.tgz --provenance --access public
2840
env:
2941
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)