Skip to content

ci: semantic-version releases from PR labels, with the latest release's bundles refreshed on every merge - #87

Merged
nicolasbisurgi merged 1 commit into
cubewise-code:optimuspy2dot0from
nicolasbisurgi:release-automation
Sep 29, 2026
Merged

nicolasbisurgi merged 1 commit into
cubewise-code:optimuspy2dot0from
nicolasbisurgi:release-automation

Conversation

@nicolasbisurgi

Copy link
Copy Markdown
Collaborator

Releases become semantic versions chosen by a label on the merged PR, and the latest release's bundles stay current between versions.

How it works

When a PR is merged to master and Tests pass, Build Executable builds the Windows, Linux x86-64 and Linux arm64 bundles. What happens next depends on the PR's label:

  • release:major, release:minor or release:patch: the version is bumped in pyproject.toml and src/optimuspy/__init__.py, committed to master and tagged vX.Y.Z. The bundles are built from that tag, and the release vX.Y.Z is created with them. Its notes are the ## X.Y.Z section of CHANGELOG.md, or GitHub's generated notes when there is none.
  • No label: the new bundles replace the ones on the latest vX.Y.Z release. The build-<sha> releases are never touched.

Details:

  • The first release. A version in the code that is newer than every release is released as it stands. The v2 merge to master, with any release label, becomes v2.0.0 rather than 3.0.0.
  • Merges close together. Master runs queue up rather than overlap. A merge whose code predates the last release bumps past that release, and its build never replaces that release's bundles.
  • Traceability. Each bundle holds a BUILD_INFO.txt with its version and commit.
  • Less CI. Tests run only when code changes (CHANGELOG.md and the workflow files count as code). A PR builds Linux x86-64 only, and a docs-only merge neither builds nor releases.
  • Forks. Releases publish only from cubewise-code/optimus-py, or from the repository named by the RELEASE_REPOSITORY variable.

The decisions are in .github/scripts/release.py, covered by tests/test_release_script.py. CONTRIBUTING.md and the new PR template explain the labels. The installation docs point at the Releases page.

Checks

  • python -m pytest -q: 473 passed, 10 live tests deselected.
  • python -m mkdocs build --strict: clean.
  • actionlint: no findings on build.yml, test.yml and deploy-site.yml.

After the merge

The optimuspy2dot0 triggers stay until the v2 merge to master, so the site keeps deploying from this branch until then.

🤖 Generated with Claude Code

…h the latest release's bundles on every merge

A merge to master whose tests pass builds the Windows, Linux x86-64 and
Linux arm64 bundles. With a release:major, release:minor or release:patch
label, the version is bumped, committed and tagged vX.Y.Z, the bundles are
built from the tag, and the release takes its notes from the CHANGELOG.md
section. Without a label, the new bundles replace those on the latest
release. A version newer than every release is released as it stands, so
2.0.0 releases as v2.0.0. Each bundle carries a BUILD_INFO.txt with its
version and commit.

The decisions live in .github/scripts/release.py, covered by
tests/test_release_script.py. Tests and the PR build run only when code
changes, and a PR builds Linux x86-64 only. Releases publish only from
cubewise-code/optimus-py. CONTRIBUTING.md and the PR template explain the
labels.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@nicolasbisurgi
nicolasbisurgi merged commit 777572c into cubewise-code:optimuspy2dot0 Sep 29, 2026
7 checks passed
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.

1 participant