Skip to content

fix: simplify release to workflow_dispatch (no bot commits)#48

Merged
Wenxin-Jiang merged 4 commits intomainfrom
fix/simplify-release-workflow
Apr 2, 2026
Merged

fix: simplify release to workflow_dispatch (no bot commits)#48
Wenxin-Jiang merged 4 commits intomainfrom
fix/simplify-release-workflow

Conversation

@Wenxin-Jiang
Copy link
Copy Markdown
Contributor

Summary

  • Removes release-prep.yml (automated version bump + PR creation that failed due to signed commit requirements)
  • Simplifies release.yml to a single workflow_dispatch trigger that reads the version from Cargo.toml
  • Adds dry-run option to build without publishing
  • Uses NPM_TOKEN secret for npm publish (fixes ENEEDAUTH on new packages that don't support OIDC yet)
  • Adds registry-url to setup-node for proper npm auth

This follows the same pattern as socket-cli.

Release flow after this change

  1. Bump version in a PR: run scripts/version-sync.sh <version>, commit, merge to main
  2. Click "Run workflow" on the Release workflow
  3. Done — tags, builds, and publishes to npm/crates.io/PyPI/GitHub Releases

Why

The previous approach required github-actions[bot] to push commits to protected branches, which was blocked by:

  • Signed commit requirements
  • PR-only push rules
  • Required workflow checks

Prerequisites

  • Add an NPM_TOKEN secret to the repo (automation token from npmjs.com @socketsecurity org)

Supersedes #47

🤖 Generated with Claude Code

Wenxin-Jiang and others added 4 commits April 1, 2026 16:00
Replace the two-workflow PR-based release flow with a single
workflow_dispatch trigger, matching the socket-cli pattern.

Changes:
- Remove release-prep.yml (automated version bump + PR creation)
- Make release.yml a manual workflow_dispatch that reads the version
  from Cargo.toml, tags, builds, and publishes
- Add dry-run option to build without publishing
- Use NPM_TOKEN secret for npm publish (fixes ENEEDAUTH on new packages)
- Add registry-url to setup-node for proper auth

Release flow after this change:
1. Bump version in a PR: run scripts/version-sync.sh, commit, merge
2. Click "Run workflow" on Release
3. Done - tags, builds, and publishes automatically

This avoids the signed commit requirement that blocked github-actions[bot]
from pushing to protected branches.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The original ENEEDAUTH failure was caused by missing registry-url in
setup-node, not missing NPM_TOKEN. With registry-url set, OIDC
trusted publishing works for both existing and new packages.

Also fixes zizmor secrets-outside-env warnings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
OIDC trusted publishing doesn't work for brand new packages that
don't exist on the npm registry yet. The new -gnu/-musl packages
need NPM_TOKEN for their first publish.

Added `environment: npm-publish` to satisfy zizmor's
secrets-outside-env audit. The environment needs to be created
in the repo settings with the NPM_TOKEN secret.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove NPM_TOKEN and environment — use the same OIDC pattern as
socket-cli and socket-mcp. The registry-url in setup-node enables
the OIDC token exchange.

Note: new packages that don't exist on npm yet must be pre-created
manually before the first publish.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Wenxin-Jiang Wenxin-Jiang requested a review from jghebre April 2, 2026 13:33
@Wenxin-Jiang Wenxin-Jiang merged commit f066f44 into main Apr 2, 2026
19 checks passed
@Wenxin-Jiang Wenxin-Jiang deleted the fix/simplify-release-workflow branch April 2, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants