Skip to content

ci: switch release-please to calver (YYYY.M.PATCH) - #43

Merged
johnnyhuy merged 1 commit into
mainfrom
feat/calver-release-please
Sep 19, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
feat/calver-release-please

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Compute the next version from today's date and the most recent calver tag, then pass it via release-as so every push to main produces a release PR (e.g. 2026.9.1, 2026.9.2, 2026.10.1).

Same-month pushes bump the patch counter; new months reset to patch 1. release-please has no native calver strategy, so this overrides its conventional-commit-derived version with the computed one each run.

PREV=$(git describe --tags --match 'v20*' --abbrev=0 2>/dev/null || true)
TODAY_YM=$(date -u +'%Y.%-m')
# if PREV matches vYYYY.M.PATCH and its YYYY.M == TODAY_YM:
#   NEXT = TODAY_YM.(PREV.patch + 1)
# else:
#   NEXT = TODAY_YM.1

Verified locally (bash 3.2.57 on macOS):

  • no prior tag → 2026.9.1
  • prev v2026.9.3 → 2026.9.4
  • prev v2026.12.5 in Sep → 2026.9.1
  • old v0.1.0 → ignored, starts new calver series

Compute the next version from today's date and the most recent
calver tag, then pass it via release-as so every push to main
produces a release PR (e.g. 2026.9.1, 2026.9.2, 2026.10.1).

Same-month pushes bump the patch counter; new months reset to
patch 1. release-please has no native calver strategy, so this
overrides its conventional-commit-derived version with the
computed one each run.
@johnnyhuy
johnnyhuy merged commit 42d318a into main Sep 19, 2026
12 checks passed
@johnnyhuy
johnnyhuy deleted the feat/calver-release-please branch September 19, 2026 09:37
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