Skip to content

Add GitHub release tagging and backfill workflows#184

Open
rasmusbe wants to merge 1 commit into
persandstrom:version-2from
rasmusbe:feat/release-tagging-workflow
Open

Add GitHub release tagging and backfill workflows#184
rasmusbe wants to merge 1 commit into
persandstrom:version-2from
rasmusbe:feat/release-tagging-workflow

Conversation

@rasmusbe

Copy link
Copy Markdown
Contributor

Summary

  • Add Release workflow: creates an annotated git tag and GitHub Release when setup.py version bumps on version-2 (also supports manual dispatch).
  • Add Backfill Releases workflow: one-time restoration of missing tags for releases already published on PyPI.
  • No PyPI publishing changes — tags and GitHub Releases only.

Tag format matches PyPI: 2.7.1 (no v prefix). Release notes are taken from the matching line in README Version History when available.

Forward releases (after merge)

  1. Bump version= in setup.py and add a line to README Version History.
  2. Merge to version-2.
  3. The Release workflow runs automatically and creates the tag + GitHub Release.

Manual cut (optional): Actions → Release → Run workflow → set ref if not releasing from version-2.

How to backfill old releases

PyPI has releases back to 2.6.2, but this repo has no git tags. Run backfill once after merging this PR.

Step 1 — Dry run (default)

  1. Go to ActionsBackfill ReleasesRun workflow.
  2. Leave defaults:
    • since: 2.6.2
    • dry_run: true
  3. Run and open the backfill-plan artifact (or read the job log).

The table shows each version, matched commit, fingerprint score, and planned action. Rows with skip-low-confidence or skip-error are not tagged automatically.

Step 2 — Review matches

Check that key versions point at sensible commits, for example:

Version Expected commit Source
2.7.1 7e93418 manual / fingerprint
2.7.0 f81d3c4 manual / fingerprint
2.6.9 dceffbe manual / fingerprint

To backfill a subset only, set versions (e.g. 2.7.0,2.7.1) instead of relying on since.

Adjust min_score (default 0.95) if a version is skipped but looks correct in the log.

Step 3 — Apply tags

  1. Run Backfill Releases again with:
    • dry_run: false
    • confirm: I-have-reviewed-the-table
  2. Keep the same since / versions / min_score as the dry run you approved.

This creates annotated tags and GitHub Releases. Existing tags are skipped.

Local dry run (optional)

git fetch origin version-2
git checkout version-2
python scripts/backfill_release_tags.py --since 2.6.2

Apply locally only if you know what you are doing:

python scripts/backfill_release_tags.py --since 2.6.2 --apply --confirm I-have-reviewed-the-table

Test plan

  • Merge PR
  • Run Backfill Releases dry run; verify plan for 2.6.22.7.1
  • Apply backfill with confirm gate
  • Verify tags exist: git fetch --tags && git tag -l '2.7.*'
  • Verify GitHub Releases page lists backfilled versions
  • Test forward release on next setup.py bump (or manual Release dispatch)

Create annotated tags and GitHub Releases when setup.py version bumps on
version-2, with manual dispatch for one-off releases. Add a separate
backfill workflow that maps PyPI artifacts to commits (default since
2.6.2, dry-run by default) to restore missing git tags for published
releases.
@persandstrom

Copy link
Copy Markdown
Owner

Thanks for the PR! I need a bit of time to review it, since I’m not very familiar with github workflows. I’m quite occupied right now, so it may take me a few weeks to get back to you.

@rasmusbe

Copy link
Copy Markdown
Contributor Author

No problems, let me know if you have any questions 😄
The reason I want to get release tags working is to not get comments like this in future releases

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.

2 participants