Skip to content

Commit 520122e

Browse files
authored
Update GitHub Actions workflow with permissions
Added permissions for OIDC and contents write access.
1 parent be2b76a commit 520122e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/test-and-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ concurrency:
1717
group: ${{ github.ref }}
1818
cancel-in-progress: true
1919

20+
permissions:
21+
id-token: write # Required for OIDC
22+
contents: write
23+
2024
jobs:
2125
# Performs quick checks before the expensive test runs
2226
check-and-lint:
@@ -119,9 +123,9 @@ jobs:
119123

120124
- name: Publish package to npm
121125
run: |
122-
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
123-
npm whoami
126+
npm install -g npm@latest
124127
npm publish
128+
125129
- name: Create Github Release
126130
uses: actions/create-release@v1
127131
env:

0 commit comments

Comments
 (0)