Skip to content

Commit 4b778b2

Browse files
authored
ci: publish through npm trusted publishing (#42)
The release job gets `id-token: write` and no longer takes an npm token. `registry-url` goes with it: `setup-node` writes an `.npmrc` with an `_authToken` placeholder for it, and that placeholder shadows OIDC.
1 parent 5fdb17e commit 4b778b2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
name: Release
4040
needs: check
4141
if: needs.check.outputs.workflow == 'release'
42+
permissions:
43+
contents: write
44+
id-token: write
4245
steps:
4346
- name: Checkout the repository
4447
uses: actions/checkout@v7
@@ -51,12 +54,10 @@ jobs:
5154
with:
5255
node-version: 24
5356
cache: 'pnpm'
54-
registry-url: 'https://registry.npmjs.org'
5557
- name: Install dependencies
5658
run: pnpm install
5759
- name: Release
5860
uses: trigensoftware/simple-release-action@latest
5961
with:
6062
workflow: release
6163
github-token: ${{ secrets.GITHUB_TOKEN }}
62-
npm-token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)