ci: automate releases with semantic-release#171
Open
nielspardon wants to merge 1 commit into
Open
Conversation
Adopt the semantic-release model used by other Substrait repos (e.g. substrait-java) to drive releases from Conventional Commits. A new scheduled (weekly) + manual `Semantic Release` workflow runs semantic-release under a GitHub App token: it computes the next version, updates CHANGELOG.md, creates the vX.Y.Z tag, and publishes a GitHub Release with generated notes. Because substrait-python derives its version from the git tag via setuptools_scm and publishes to PyPI via Trusted Publishing (OIDC), the publish step stays in the existing release.yml (filename preserved for the PyPI trusted publisher). It is repurposed to trigger on the tag pushed by semantic-release, dropping the now-duplicate GitHub Release job. The App token ensures the tag push triggers this workflow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This comment was marked as resolved.
This comment was marked as resolved.
Member
Author
|
I did create a new |
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.
What
Automate releases with
semantic-release, matching the
model used by other Substrait repos such as substrait-java.
How it fits together
A new scheduled (weekly) + manual
Semantic Releaseworkflow runssemantic-release under a GitHub App token. It analyzes Conventional
Commits, computes the next
vX.Y.Z, updatesCHANGELOG.md, pushes thetag, and creates a GitHub Release with generated notes.
The existing
release.ymlkeeps its filename (the PyPI trusted-publisherbinding depends on it) and is repurposed to trigger on that tag, building
the package and publishing to PyPI via Trusted Publishing.
This is a hybrid of the java model rather than a literal copy, because
substrait-python derives its version from the git tag via setuptools_scm
(no version file to bump) and publishes via Trusted Publishing / OIDC,
which must run in
pypa/gh-action-pypi-publishrather than a shellpublishCmd.Changes
ci/release/run.sh— runssemantic-release --civia npx..releaserc.json— conventionalcommits preset on main, breakingto minor (pre-1.0, matching java), changelog + github + git plugins.
.github/workflows/semantic-release.yml— scheduled + manual,runs under a GitHub App token so the pushed tag triggers release.yml.
.github/workflows/release.yml— tags-only trigger, droppedthe duplicate GitHub Release job, publish now needs build.
RELEASING.md— documents the automated flow.Required before this works
installed on this repo with push and branch-protection-bypass rights.
and environment pypi (preserved by this PR).
Verification done
Closes #147