Skip to content

Commit c07a9d0

Browse files
committed
Update publishing workflow for npm registry use
- Update the publishing workflow to deploy packages to npm instead of GitHub Packages. - Change authentication method from GitHub token to npm token for secure publishing. - Adjust the publish command to ensure public access to the npm package. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
1 parent 86624c7 commit c07a9d0

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/publish.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
1-
name: Publish to GitHub Packages
2-
1+
name: Publish to npm
32
on:
43
push:
54
tags:
65
- 'v*.*.*'
76

8-
permissions:
9-
contents: read
10-
packages: write
11-
127
jobs:
138
publish:
149
runs-on: ubuntu-latest
1510

1611
steps:
17-
- name: Check out repository code
12+
- name: Checkout
1813
uses: actions/checkout@v4
1914

2015
- name: Set up Node
2116
uses: actions/setup-node@v4
2217
with:
2318
node-version: 20
24-
registry-url: 'https://npm.pkg.github.com'
19+
registry-url: 'https://registry.npmjs.org/'
2520

2621
- name: Install pnpm
2722
run: npm install -g pnpm
@@ -33,6 +28,6 @@ jobs:
3328
run: pnpm run build
3429

3530
- name: Publish
36-
run: pnpm publish --no-git-checks
31+
run: pnpm publish --access public --no-git-checks
3732
env:
38-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)