Skip to content

Commit 7855a88

Browse files
committed
switch to trusted publisher instead of npm secret
1 parent df41dc7 commit 7855a88

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
id-token: write
1215
steps:
1316
- uses: actions/checkout@v4
1417
with:
@@ -29,6 +32,5 @@ jobs:
2932
- run: pnpm version $GITVERSION_SEMVER --no-git-tag-version
3033
- run: pnpm install --frozen-lockfile
3134
- run: pnpm build
32-
- run: pnpm publish --access public --no-git-checks
33-
env:
34-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
35+
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
36+
run: pnpm publish --access public --no-git-checks

0 commit comments

Comments
 (0)