Skip to content

Add tag-driven GitHub release workflow with version gate#65

Merged
espenhgn merged 3 commits into
mainfrom
copilot/add-gh-action-for-releases
Apr 21, 2026
Merged

Add tag-driven GitHub release workflow with version gate#65
espenhgn merged 3 commits into
mainfrom
copilot/add-gh-action-for-releases

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Changes proposed in this pull request:

  • This PR adds automated GitHub Releases for version tags and enforces that release tags match the project version declared in version/version.py.
  • Release automation
    • New workflow: .github/workflows/release.yml
    • Triggers on tag push pattern v*.*.*
    • Verifies tagged commit is on main before releasing
    • Creates a GitHub Release with autogenerated release notes
  • Version/tag consistency guard
    • Strips v from github.ref_name
    • Loads VERSION from version/version.py
    • Fails the workflow when VERSION != tag
  • Coverage for workflow contract
    • Added tests/test_release_workflow.py to assert:
      • tag trigger exists
      • main ancestry check is present
      • version check references version/version.py and VERSION
      • release action enables generated notes
- name: Check version matches tag
  run: |
    TAG_VERSION="${GITHUB_REF_NAME#v}"
    python - <<'PY'
    import pathlib, os
    values = {}
    exec(pathlib.Path("version/version.py").read_text(), None, values)
    if values["VERSION"] != os.environ["TAG_VERSION"]:
        raise SystemExit("version/version.py does not match tag")
    PY

Before submitting

  • I've read and followed all steps in the Making a pull request
    section of the CONTRIBUTING docs.
  • I've updated or added any relevant docstrings following the syntax described in the
    Writing docstrings section of the CONTRIBUTING docs.
  • If this PR fixes a bug, I've added a test that will fail without my fix.
  • If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

Copilot AI linked an issue Apr 21, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add GH action to automatize releases Add tag-driven GitHub release workflow with version gate Apr 21, 2026
Copilot AI requested a review from espenhgn April 21, 2026 07:37
@espenhgn espenhgn marked this pull request as ready for review April 21, 2026 07:37
@espenhgn espenhgn merged commit d9b4cda into main Apr 21, 2026
6 of 7 checks passed
@espenhgn espenhgn deleted the copilot/add-gh-action-for-releases branch April 21, 2026 07:38
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.

Add GH action to automatize releases

2 participants