Skip to content

ci: automate releases with semantic-release#171

Open
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:ci/automated-semantic-release
Open

ci: automate releases with semantic-release#171
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:ci/automated-semantic-release

Conversation

@nielspardon

@nielspardon nielspardon commented Jun 8, 2026

Copy link
Copy Markdown
Member

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 Release workflow runs
semantic-release under a GitHub App token. It analyzes Conventional
Commits, computes the next vX.Y.Z, updates CHANGELOG.md, pushes the
tag, and creates a GitHub Release with generated notes.

The existing release.yml keeps its filename (the PyPI trusted-publisher
binding 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-publish rather than a shell
publishCmd.

Changes

  • New ci/release/run.sh — runs semantic-release --ci via npx.
  • New .releaserc.json — conventionalcommits preset on main, breaking
    to minor (pre-1.0, matching java), changelog + github + git plugins.
  • New .github/workflows/semantic-release.yml — scheduled + manual,
    runs under a GitHub App token so the pushed tag triggers release.yml.
  • Changed .github/workflows/release.yml — tags-only trigger, dropped
    the duplicate GitHub Release job, publish now needs build.
  • Changed RELEASING.md — documents the automated flow.

Required before this works

  1. The RELEASER GitHub App (RELEASER_ID / RELEASER_KEY secrets) must be
    installed on this repo with push and branch-protection-bypass rights.
  2. The PyPI Trusted Publisher must remain bound to workflow release.yml
    and environment pypi (preserved by this PR).

Verification done

  • shellcheck on ci/release/run.sh — clean
  • JSON / YAML / bash syntax validated

Closes #147

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>
@github-actions

This comment was marked as resolved.

@nielspardon

Copy link
Copy Markdown
Member Author

I did create a new substrait-python releaser Github App on the substrait-io organization and configured GH Actions secrets for RELEASER_ID and RELEASER_KEY for the substrait-python repo.

@nielspardon nielspardon marked this pull request as ready for review June 8, 2026 11:44
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.

Automate version bumping on release

1 participant