infra: add Release workflow (one-click tag + publish)#29
Merged
Conversation
Adds a workflow_dispatch action that reads __version__ from src/canopy/__init__.py, refuses if the corresponding tag already exists, and pushes vN.N.N. The existing publish.yml fires on the tag push and ships canopy-cli to PyPI. New release flow: 1. Merge a PR that bumps __version__ (and CHANGELOG) 2. Actions → "Release (tag from __version__)" → Run workflow 3. Done. Replaces the manual `git tag vN.N.N && git push origin vN.N.N` step.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the manual
git tag vN.N.N && git push origin vN.N.Nrelease step with a one-click workflow.Release (tag from __version__)is aworkflow_dispatchaction. When you click Run workflow in the Actions UI, it:__version__fromsrc/canopy/__init__.pyvN.N.Nalready exists (so you must bump first)The existing
publish.ymlis unchanged — it still fires on tag push and OIDC-publishes to PyPI.New release flow
__version__(andCHANGELOG.md)canopy-cli vN.N.N~30s later.Test plan
v3.1.1is pushedpublish.ymlfires on the tag push and publishescanopy-cli 3.1.1to PyPI