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
ci: npm publish via OIDC trusted publishing (no token secret) (#21)
Swaps the NPM_TOKEN requirement for npm's Trusted Publisher flow: the
workflow identity (InsForge/insta-cli release.yml) is trusted directly
on npmjs.com. npm upgraded on the runner (OIDC exchange needs ≥11.5).
Skill release section updated in the same PR per its keep-true rule.
Claude-Session: https://claude.ai/code/session_01GMbAe5K1RfwaAcge5inX7P
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/developing-insta-cli/SKILL.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,10 @@ npx tsx src/index.ts --help # run the CLI from source
31
31
1.**Bump**: PR changing `package.json` version (main is protected — never commit the bump directly). Merge it via the flow above.
32
32
2.**Tag**: `git checkout main && git pull && git tag vX.Y.Z && git push origin vX.Y.Z`.
33
33
3.**Binaries (automatic)**: the `release` workflow builds 5 platform binaries + SHA256SUMS and publishes a GitHub Release. `install.sh`, `agents.sh`, and `insta upgrade` serve users from it immediately.
34
-
4.**npm (automatic on tag IF the `NPM_TOKEN` repo secret is set)**: the `publish-npm` job in
35
-
`release.yml` publishes with a granular automation token (`--provenance`). If that job fails
36
-
with "secret is not set", or for an out-of-band publish, the manual fallback — from a clean
37
-
checkout at the tag, repo root:
34
+
4.**npm (automatic on tag — OIDC trusted publishing)**: the `publish-npm` job authenticates via
35
+
OpenID Connect (npmjs.com → `insta` → Trusted Publisher = this repo's `release.yml`); no token
36
+
secret exists. If npm ever rejects the OIDC exchange, or for an out-of-band publish, the manual
37
+
fallback — from a clean checkout at the tag, repo root:
Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+5-11Lines changed: 5 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -107,16 +107,10 @@ jobs:
107
107
with:
108
108
node-version: 22
109
109
registry-url: https://registry.npmjs.org
110
-
- name: Require NPM_TOKEN
111
-
env:
112
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
113
-
run: |
114
-
if [ -z "$NPM_TOKEN" ]; then
115
-
echo "::error::NPM_TOKEN repo secret is not set — create a GRANULAR automation token at npmjs.com (Access Tokens → Generate → Granular, packages: insta, permissions: read/write) and add it under Settings → Secrets → Actions."
116
-
exit 1
117
-
fi
110
+
# OIDC trusted publishing: npm trusts this workflow's identity directly (configured on
0 commit comments