Skip to content

Commit eb8f623

Browse files
authored
Update publishing workflow to use trusted publishing (#1033)
* add permissions to workflow * add specific NPM version * remove unused NPM tokens
1 parent f1d282d commit eb8f623

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
tags:
99
- '*'
1010

11+
permissions:
12+
id-token: write
13+
contents: read
14+
1115
jobs:
1216
publish-npm:
1317
runs-on: ubuntu-latest
@@ -18,6 +22,9 @@ jobs:
1822
node-version: 22
1923
registry-url: https://registry.npmjs.org/
2024

25+
- name: Update npm for Trusted Publishing
26+
run: npm install -g [email protected]
27+
2128
- name: Set up npmrc
2229
id: setup-npmrc
2330
run: echo "@tiptap-cloud:registry=https://registry.tiptap.dev/" >> ~/.npmrc && echo "//registry.tiptap.dev/:_authToken=${{ secrets.TIPTAP_PRIVATE_REGISTRY_NPM_TOKEN }}" >> ~/.npmrc
@@ -26,10 +33,6 @@ jobs:
2633

2734
- run: npm run publish
2835
if: "!contains(github.ref, '-rc.')"
29-
env:
30-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
3136

3237
- run: npm run publish:pre
3338
if: "contains(github.ref, '-rc.')"
34-
env:
35-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)