Skip to content

Commit 063dcba

Browse files
Merge pull request #522 from web-ridge/copilot/fix-trusted-publishing-issue
ci: migrate npm publishing to trusted publishing (OIDC)
2 parents 1018655 + 6dd0348 commit 063dcba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
release:
5050
runs-on: ubuntu-latest
5151
if: github.ref == 'refs/heads/master'
52+
permissions:
53+
contents: write
54+
id-token: write
5255
steps:
5356
- name: Checkout
5457
uses: actions/checkout@v3
@@ -60,10 +63,10 @@ jobs:
6063
run: |
6164
git config user.name "${GITHUB_ACTOR}"
6265
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
63-
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
6466
- run: yarn release
6567
env:
6668
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
NPM_CONFIG_PROVENANCE: true
6770
deploy-example:
6871
runs-on: ubuntu-latest
6972
if: github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)