Skip to content

fix: split release workflow into PR-based prep + auto-publish#47

Merged
Wenxin-Jiang merged 2 commits intomainfrom
fix/release-workflow-pr-based
Apr 1, 2026
Merged

fix: split release workflow into PR-based prep + auto-publish#47
Wenxin-Jiang merged 2 commits intomainfrom
fix/release-workflow-pr-based

Conversation

@Wenxin-Jiang
Copy link
Copy Markdown
Contributor

Summary

The release workflow currently pushes version bumps directly to main, which fails due to branch protection rules (requires PRs, signed commits, required workflows).

This splits the release into two workflows:

  1. Prep Release (release-prep.yml, workflow_dispatch): bumps version and opens a PR to main
  2. Release (release.yml, auto-triggers on PR merge): when a release/v* branch merges to main, it tags the commit, builds all platform binaries, and publishes to npm/crates.io/PyPI/GitHub Releases

Release flow after this change

  1. Click "Run workflow" on Prep Release → select patch/minor/major
  2. Review and merge the auto-created PR
  3. Release triggers automatically on merge — no admin access needed

Closes the issue where github-actions[bot] can't push directly to protected main.

Wenxin-Jiang and others added 2 commits April 1, 2026 14:55
The previous release workflow pushed version bumps directly to main,
which is blocked by branch protection rules. Split into two workflows:

1. release-prep.yml (workflow_dispatch): bumps version and opens a PR
2. release.yml (on PR merge): tags, builds, and publishes when a
   release/v* branch is merged to main

This allows releases without needing admin bypass for github-actions[bot].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Passes github.event.pull_request.head.ref through an env variable
instead of direct template expansion to satisfy zizmor audit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Wenxin-Jiang Wenxin-Jiang requested review from jghebre and mtorp April 1, 2026 19:11
@Wenxin-Jiang Wenxin-Jiang merged commit 64c0140 into main Apr 1, 2026
19 checks passed
@Wenxin-Jiang Wenxin-Jiang deleted the fix/release-workflow-pr-based branch April 1, 2026 19:45
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