Skip to content

ci: tag main at each datajoint-python release - #303

Open
dimitri-yatsenko wants to merge 3 commits into
mainfrom
ci/tag-library-releases
Open

dimitri-yatsenko wants to merge 3 commits into
mainfrom
ci/tag-library-releases

Conversation

@dimitri-yatsenko

@dimitri-yatsenko dimitri-yatsenko commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds tags to this repo that match datajoint-python releases. Each vX.Y.Z tag marks the last commit on main at the moment that library version was published, so the docs as they stood when a version shipped can always be recovered (git checkout v2.3.6). It also lays the groundwork for versioned docs later, if wanted.

  • scripts/tag_library_releases.py reads the published datajoint-python releases (drafts and pre-releases excluded) and tags main at git rev-list -1 --first-parent --before=<published_at> origin/main. It never moves an existing tag, so reruns are safe. --dry-run prints the mapping. It uses only the Python standard library and the GitHub CLI.
  • .github/workflows/tag-library-releases.yml runs it daily and on demand. Tag placement depends only on the publish time, so a daily schedule loses nothing, and it needs no cross-repo token. The first run after merge backfills. actions/checkout is pinned by commit SHA like the other workflows here. The job uses the runner's own python3, so there is no setup-python step, and its only permission is contents: write to push tags.
  • Skipped releases:
    • Maintenance releases of an older line published after 2.0 (for example 0.14.8–0.14.10 and 0.11.2) are skipped, because main documented the newer line when they shipped.
    • Releases before 2.0.0 are skipped too.
  • No GitHub releases are created here; release notes stay with the library.

A tag is a snapshot taken at release time, not a promise that the docs match that version exactly: main can be ahead of or behind the library.

Backfill (dry run against current history)

Tag Docs commit Library published (UTC)
v2.0.0 783ced6 2026-02-03 01:55
v2.0.1 d1b9288 2026-02-03 19:46
v2.0.2 64f0560 2026-02-05 18:35
v2.1.0 64f0560 2026-02-05 21:43
v2.1.1 f99e102 2026-02-17 19:54
v2.2.0 88eb68b 2026-04-01 15:51
v2.2.1 c7eb390 2026-04-09 14:19
v2.2.2 9e01c44 2026-05-01 18:37
v2.2.3 82cbf9f 2026-06-05 14:46
v2.2.4 82cbf9f 2026-06-05 19:07
v2.3.0 431fb15 2026-07-02 19:03
v2.3.1 152cb25 2026-07-16 23:56
v2.3.2 b7a0c88 2026-07-21 21:31
v2.3.3 9183106 2026-09-09 22:42
v2.3.4 cf3397f 2026-10-04 20:19
v2.3.5 20a126d 2026-10-21 16:24
v2.3.6 801559c 2026-11-18 16:54

Test plan

  • --dry-run locally produces the table above; v2.3.4 lands on "docs: what's new in 2.3.4" (What's new in 2.3.4 #289), merged three minutes before the library release.
  • Workflow YAML parses.
  • After merge: run the workflow once via workflow_dispatch and confirm the 17 tags appear.

A daily workflow tags main with vX.Y.Z at the last commit before each
datajoint-python release was published, so the docs as they stood when a
version shipped can be recovered. The first run backfills v2.0.0 onward.
@dimitri-yatsenko dimitri-yatsenko added the enhancement New feature or request label Oct 15, 2026
@dimitri-yatsenko
dimitri-yatsenko marked this pull request as draft October 21, 2026 16:46
@dimitri-yatsenko

Copy link
Copy Markdown
Member Author

Main merged in. actions/checkout is now pinned by commit SHA like the other workflows, the setup-python step is gone (the script uses only the standard library; the job runs the runner's python3), and the backfill table includes v2.3.5 and v2.3.6. Ready for review.

@dimitri-yatsenko
dimitri-yatsenko marked this pull request as ready for review December 1, 2026 23:18

This branch has not been deployed

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant