Skip to content

Commit 64dd628

Browse files
committed
ci(npm): allow token bootstrap before trusted publishing
1 parent 2f990d3 commit 64dd628

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎.github/RELEASE_CHECKLIST.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ cd playground/wfkit
2424
bun run build
2525
```
2626

27-
Before cutting the first npm release, make sure npm trusted publishing is configured for `@flowmetelev/wfkit` with:
27+
For the first npm release, use a publish-capable `NPM_TOKEN` if the package does not exist yet.
28+
After `@flowmetelev/wfkit` exists on npm, configure trusted publishing with:
2829

2930
- owner: `flowmetelev`
3031
- repository: `wfkit`

‎.github/workflows/publish.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,5 @@ jobs:
134134
if: steps.version.outputs.should_publish_npm == 'true'
135135
working-directory: npm
136136
run: npm publish --access public
137+
env:
138+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

‎README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,11 @@ After that:
262262
2. open and merge the PR into `main`
263263
3. GitHub Actions creates the release automatically if that version tag does not already exist
264264

265-
The npm publish step uses npm trusted publishing via GitHub Actions OIDC.
266-
Before the first release, configure a trusted publisher for `@flowmetelev/wfkit` in npm and point it at:
265+
The npm publish step is set up for npm trusted publishing via GitHub Actions OIDC.
266+
For the first release, you can keep a publish-capable `NPM_TOKEN` as a bootstrap path.
267+
After `@flowmetelev/wfkit` exists on npm, configure a trusted publisher and then remove the token.
268+
269+
Trusted publisher settings for `@flowmetelev/wfkit`:
267270

268271
- owner: `flowmetelev`
269272
- repository: `wfkit`

0 commit comments

Comments
 (0)