Skip to content

ci: automate release flow with PR-based publishing#28

Merged
felippemsc merged 1 commit intomainfrom
ci/release-flow
Feb 8, 2026
Merged

ci: automate release flow with PR-based publishing#28
felippemsc merged 1 commit intomainfrom
ci/release-flow

Conversation

@felippemsc
Copy link
Contributor

@felippemsc felippemsc commented Feb 8, 2026

Summary

  • Add release-pr.yml workflow: automatically creates a version bump PR when a GitHub Release is published
  • Rework release.yml triggers: publish to PyPI and crates.io only when a release PR is merged (detected via version change in Cargo.toml)
  • Remove pull_request trigger from release workflow to avoid unnecessary wheel builds on every PR

Release flow

  1. Create a GitHub Release with tag v0.2.0
  2. release-pr.yml creates branch release/0.2.0, bumps version in Cargo.toml + pyproject.toml, opens PR
  3. Review and merge the PR
  4. release.yml detects version change → publishes to PyPI + crates.io automatically

What runs when

Event CI Wheel builds Publish
PR to main Yes No No
Push to main (regular) Yes Yes TestPyPI only
Push to main (release merge) Yes Yes PyPI + crates.io + TestPyPI

Setup required

  • Add CARGO_REGISTRY_TOKEN secret to the repo (from crates.io API Tokens)

Test plan

  • Verify CI still runs on PRs (no wheel builds)
  • Verify wheel builds run on push to main
  • Test release flow with a GitHub Release

@felippemsc felippemsc merged commit e541437 into main Feb 8, 2026
5 checks passed
@felippemsc felippemsc deleted the ci/release-flow branch February 8, 2026 14:08
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.

1 participant