-
Notifications
You must be signed in to change notification settings - Fork 5
ci(release): allow optional branch argument (defaults to main) #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eywalker
merged 11 commits into
main
from
eywalker/itl-545-release-cutting-allow-optional-branch-argument-defaults-to
Jul 21, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c08f8c2
docs(specs): add ITL-545 release branch argument design
kurodo3[bot] 0d4417d
docs(plans): add ITL-545 release branch argument implementation plan
kurodo3[bot] fda2e31
ci(release): add optional branch input (defaults to main)
kurodo3[bot] ddf8212
ci(release): add validate-branch pre-flight job
kurodo3[bot] 1f76922
ci(release): fix script injection in validate-branch via env var
kurodo3[bot] 4e78393
ci(release): wire branch input into test and license-check jobs
kurodo3[bot] 24b7569
ci(release): wire branch input into build checkout
kurodo3[bot] 6b17f39
docs(releasing): document optional branch argument and hotfix example
kurodo3[bot] 6c081df
docs(releasing): update job graph to include validate-branch
kurodo3[bot] 255d054
fix(release): url-encode branch in gh api call; clarify workflow-from…
kurodo3[bot] 492530e
ci(release): wire branch through to license-check reusable workflow
kurodo3[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,19 +16,20 @@ Releases are triggered from the GitHub Actions UI — no manual `git tag` step r | |
|
|
||
| 2. **Trigger the release workflow** — go to | ||
| **[Actions → Release → Run workflow](https://github.com/nauticalab/orcapod-python/actions/workflows/release.yml)** | ||
| in the GitHub UI, enter the version (e.g. `0.1.0`), and click **Run workflow**. | ||
| in the GitHub UI, enter the version (e.g. `0.1.0`), optionally enter a branch name | ||
| (defaults to `main`), and click **Run workflow**. | ||
|
|
||
| A leading `v` is stripped automatically — `v0.1.0` and `0.1.0` both work. | ||
|
|
||
| 3. **CI takes over** — the workflow runs the following jobs automatically: | ||
|
|
||
| ``` | ||
| test ──────────┐ | ||
| license-check ────┤─ build ─┬─ publish-testpypi ─ publish-pypi ─┐ | ||
| └─ linear-sync ─────────────────────┴─ linear-complete | ||
| validate-branch ─┬─ test ──────────┐ | ||
| └─ license-check ──┤─ build ─┬─ publish-testpypi ─ publish-pypi ─┐ | ||
| └─ linear-sync ──────────────────────┴─ linear-complete | ||
| ``` | ||
|
|
||
| - Pre-flight: tests on Python 3.11 and 3.12, plus license check (in parallel) | ||
| - Pre-flight: branch validation, then tests on Python 3.11 and 3.12 and license check (parallel after validation) | ||
| - Build: normalises version, creates local tag, builds wheel + sdist, pushes tag to origin | ||
| - TestPyPI: publishes to test.pypi.org first as a staging step | ||
| - PyPI: publishes to pypi.org and creates a GitHub Release with generated release notes | ||
|
|
@@ -42,6 +43,25 @@ workflow input. PyPI handles the stable vs pre-release distinction natively: | |
| - `pip install orcapod` — installs the latest **stable** release only | ||
| - `pip install --pre orcapod` — installs the latest release including pre-releases | ||
|
|
||
| ## Cutting a Hotfix Release | ||
|
|
||
| To release from a branch other than `main` — for example, a maintenance branch carrying | ||
| a critical patch — enter the branch name in the **Branch** field when triggering the | ||
| workflow. | ||
|
Comment on lines
+48
to
+50
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 255d054. Added a step 2 to the hotfix example explicitly calling out that the Use workflow from dropdown should remain on |
||
|
|
||
| **Example:** cutting `v0.1.1` from `hotfix/0.1.x`: | ||
|
|
||
| 1. **Trigger the release workflow** — go to | ||
| **[Actions → Release → Run workflow](https://github.com/nauticalab/orcapod-python/actions/workflows/release.yml)** | ||
| 2. In the **Use workflow from** dropdown, keep `main` selected (so the workflow version | ||
| includes the `Branch` field — do not select `hotfix/0.1.x` here) | ||
| 3. Set **Version** to `0.1.1` | ||
| 4. Set **Branch** to `hotfix/0.1.x` | ||
| 5. Click **Run workflow** | ||
|
|
||
| The workflow will confirm the branch exists, run tests against it, create the `v0.1.1` | ||
| tag at its tip, and publish to PyPI — identical to a normal release. | ||
|
|
||
| ## Tag Format | ||
|
|
||
| | Release type | Tag format | Example | | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This limitation was explicitly acknowledged in the design spec and scoped out: the license check validates installed dependencies (from
pyproject.toml/uv.lock), not branch-specific source, so running it against the dispatch ref is considered acceptable for this workflow. The_license-check.ymlreusable workflow has noworkflow_callinputs, so it cannot receive arefwithout a more involved interface change — that's a separate piece of work. Leaving as-is per the original design decision.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not address this change in this issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 492530e. Added a
branchinput (defaultmain) to_license-check.yml'sworkflow_calltrigger and wiredref: ${{ inputs.branch }}into its checkout step. Thelicense-checkjob inrelease.ymlnow passeswith: branch: ${{ inputs.branch }}through to the reusable workflow.