Skip to content

Automate PyPI releases from version tags - #20

Merged
jclusso merged 1 commit into
masterfrom
release-workflow
Nov 5, 2026
Merged

jclusso merged 1 commit into
masterfrom
release-workflow

Conversation

@jclusso

@jclusso jclusso commented Nov 5, 2026

Copy link
Copy Markdown
Member

Releases were published by hand, so a step like bumping VERSION or creating the GitHub release could be missed. Running make release VERSION=x.y.z now checks the branch and tests before tagging, and pushing the tag publishes to PyPI through trusted publishing from a release environment that only version tags can deploy to. Before the first release, add a PyPI trusted publisher for release.yml with environment release.

@jclusso
jclusso requested a review from eberquist as a code owner November 5, 2026 19:59
Copilot AI balanced review requested due to automatic review settings November 5, 2026 19:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The release flow commits before checking for an existing tag, so a duplicate tag leaves master ahead of origin/master and blocks a corrected retry at the sync check.

1 open issue
What changed in this PR

Automates the Python package’s release process, from local validation and version tagging to publishing on PyPI and creating a GitHub release.

Changes:

  • Adds make release VERSION=x.y.z to check repository state, run tests, bump VERSION, and create a release commit and tag.
  • Adds a version-tag-triggered workflow using PyPI trusted publishing through the release environment.
  • Documents the release commands.
File Description
README.md Documents how to prepare and push a release.
Makefile Adds local release checks, version updates, commits, and tagging.
.github/​workflows/​release.yml Validates tags, tests and builds the package, publishes to PyPI, and creates a GitHub release.

Review effort: Balanced

Comment thread Makefile Resolved
@jclusso
jclusso force-pushed the release-workflow branch 2 times, most recently from 4c177dd to bf6c9dd Compare November 5, 2026 20:08
@jclusso
jclusso requested a balanced review from Copilot November 5, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Release automation accepts leading-zero versions that can collide with existing PyPI releases and lacks skip-existing, leaving reruns blocked by duplicate uploads after a GitHub release failure.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread .github/workflows/release.yml Resolved
Comment thread Makefile Resolved
Releases were published by hand, so a step like bumping VERSION or
creating the GitHub release could be missed. Pushing a tag made by
`make release` now publishes to PyPI through trusted publishing.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The release environment’s tag-only deployment rules and PyPI trusted publisher configuration are not visible in this PR and must be verified before publishing is enabled.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@jclusso
jclusso merged commit 9134f75 into master Nov 5, 2026
5 checks passed
@jclusso
jclusso deleted the release-workflow branch November 5, 2026 20:21
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