You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove token-based npm authentication from the release workflow so CI can publish through npm Trusted Publishing with GitHub OIDC. Update the release guide to document the npm-side trusted publisher setup and clarify that no NPM_TOKEN secret is required.
Copy file name to clipboardExpand all lines: docs/setup/RELEASING.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,22 @@ NomadWorks publishes to npm as `@neuralnomads/nomadworks`.
7
7
- Versioning, build verification, and npm publishing are handled by the GitHub Actions workflow `Release npm package`.
8
8
- Pushes to `dev` automatically publish npm prereleases.
9
9
- Pushes to `main` automatically publish stable npm releases.
10
+
- GitHub Actions publishes through npm Trusted Publishing with provenance enabled.
10
11
- The workflow does not commit or tag version changes back to the repository. It derives the publish version from `package.json` and npm's already-published versions.
11
12
12
-
## Required Repository Secret
13
+
## Trusted Publishing Setup
13
14
14
-
Add this repository secret before publishing:
15
+
Configure npm Trusted Publishing for this GitHub repository before relying on CI publishes.
15
16
16
-
-`NPM_TOKEN`: npm access token with permission to publish `@neuralnomads/nomadworks`
17
+
At a minimum, npm must trust this repository's GitHub Actions workflow as a publisher for `@neuralnomads/nomadworks`.
18
+
19
+
Expected setup:
20
+
21
+
1. Open the npm package settings for `@neuralnomads/nomadworks`.
22
+
2. Configure a Trusted Publisher for this GitHub repository.
23
+
3. Allow GitHub Actions from this repository to publish the package.
24
+
25
+
No `NPM_TOKEN` repository secret is required once Trusted Publishing is configured correctly.
17
26
18
27
## Workflow Behavior
19
28
@@ -24,7 +33,7 @@ The release workflow performs these steps:
24
33
3. Runs `npm run release:check`, which executes tests, builds `dist/`, and previews the publish tarball.
25
34
4. Resolves the publish version based on the current branch and npm registry history.
26
35
5. Applies that version locally with `npm version --no-git-tag-version`.
27
-
6. Publishes the package with `npm publish --provenance`.
36
+
6. Publishes the package with `npm publish --provenance` using npm Trusted Publishing.
28
37
29
38
## Branch Behavior
30
39
@@ -79,4 +88,5 @@ This command:
79
88
-`prepack` runs `npm run build`, so local `npm pack` and `npm publish` always include a fresh `dist/` build.
80
89
-`publishConfig.access` is set to `public` so the scoped package can publish correctly on npm.
81
90
- The prerelease counter is remembered via npm registry history, not via git tags or committed prerelease versions.
91
+
- CI publishing depends on npm Trusted Publishing plus the workflow permission `id-token: write`.
82
92
- If you need to dry-run a release locally without publishing, use `npm run release:check` and inspect the tarball preview output.
0 commit comments