Skip to content

ci: move to trunk-based releases with edge and latest images #10

Open

Description

@tabedzki

🤖 AI text below 🤖

Proposal to replace the dev/main split with a single main branch, where a release is a git tag. The work is on tabedzki/ci/trunk-release-workflow (no PR yet).

Why

  • Keeping dev and main aligned needs extra tooling: the unmerged promote and sync-back workflows exist only for that.
  • PRs merge into dev while main is the default branch, so Fixes #N doesn't close issues when the PR merges.
  • Hotfixes either ship everything waiting on dev or need a merge back from main.
  • latest drives production through Watchtower, but the rules protecting it were weak. Pre-release detection matched single letters in the tag, and nothing stopped an older tag from moving latest backwards.

What the branch does

You push Python version Image tags
Merge to main 1.6.0.dev4+gabc1234 edge, sha-abc1234
Tag v1.6.0rc1 1.6.0rc1 v1.6.0rc1, 1.6.0rc1
Tag v1.6.0 1.6.0 v1.6.0, 1.6.0, 1.6, latest
  • The version comes from git tags through setuptools-scm.
  • scripts/release_tag.py gives latest only to the highest final release, and malformed tags fail the build.
  • Each release builds once, and tests must pass before any image is published.
  • Ubuntu and uv are pinned, and Python comes from a single .python-version file.
  • draft-pdf.yml uploads an artifact instead of committing to the branch, so paper/paper.pdf in the repo stops updating.
  • The Codecov upload uses files: and a token.
  • CONTRIBUTING.md and docs/development.md describe the new process.

Verified so far

  • Full test suite: 971 passed, 1 expected failure. ruff is clean, and actionlint printed no errors.
  • The wheel's contents match the wheel built before the change.
  • Local Docker builds report the right version with and without a version argument, exclude .git, and answer /liveness.

The workflows have not run on GitHub Actions yet. Publishing to GHCR, the Codecov token and the reusable tests workflow are unproven.

To do before merging

  • Land the 8 commits on dev that main doesn't have, then retire dev
  • Close or rebase ci: publish dev/latest Docker images on every push, lint workflows with actionlint m-beau/pixelmap#90, which adds latest on pushes to main
  • Don't merge the promote and sync-back workflows
  • Make the CITATION.cff test on the docs branch compare against the base release, not the dev version
  • Update CITATION.cff, which still says 1.4.0 on main
  • Add the CODECOV_TOKEN secret if it isn't set (a missing token won't fail CI)
  • Set Read the Docs stable to follow tags
  • Run the workflows on GitHub Actions and confirm the image tags in the table above

Known trade-offs

  • main holds unreleased code, so the README and docs need to point readers at releases.
  • Fixing a release while main has unshipped changes needs a release/X.Y.x branch.
  • Tests run twice on pushes to main: once for the README badge and once to gate the image.
  • After tagging v1.6.0rc1 on main, dev versions become 1.7.0.dev1. This is cosmetic, and v1.6.0 still works.
  • Tag builds run one at a time and GitHub keeps only one waiting, so if three tags are pushed quickly, the middle build is cancelled and needs a manual re-run.

Assisted-by: ClaudeCode:claude-opus-5-5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions