Skip to content

Commit d9abfa7

Browse files
authored
Merge pull request #457 from geolonia/add-oidc-publising
Remove token based npm publish
2 parents 266517c + 19c06cb commit d9abfa7

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ jobs:
8686
publish:
8787
name: 'Publish npm package'
8888
runs-on: ubuntu-latest
89+
permissions:
90+
id-token: write
91+
contents: read
8992
needs:
9093
- build
9194
- act-test
@@ -102,16 +105,18 @@ jobs:
102105
uses: actions/download-artifact@v4
103106
with:
104107
name: the-built
108+
109+
- name: Update npm
110+
run: npm install -g npm@latest
111+
105112
- name: 'Publish to NPM (latest)'
106113
if: "!contains(github.ref, '-pre.')"
107114
run: npm publish --access=public
108-
env:
109-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
115+
110116
- name: 'Publish to NPM (next)'
111117
if: "contains(github.ref, '-pre.')"
112118
run: npm publish --access=public --tag=next
113-
env:
114-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
119+
115120
deploy:
116121
needs: build
117122
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)