Skip to content

Fix CI prev-tag selection and git push auth #37

David ROFF requested to merge fix/issue-37-ci-prev-tag-and-push-auth into main

The first re-triggered 2025-1 release surfaced two bugs in the publish job:

  1. PREV_TAG resolved to v2023-2 instead of 2024-2. git tag --sort=-version:refname doesn't sort cleanly when the tag list mixes legacy v-prefixed tags (v2022-1..v2023-2) with modern unprefixed tags (2024-1, 2024-2, 2025-1). Filter to YYYY-N only and sort numerically by year then period.

  2. git push to main failed with HTTP Basic auth error. The 'gitlab-ci-token:' username is for the auto-provided CI_JOB_TOKEN (which can't push). For project access tokens stored as CI variables, the username must be 'oauth2'. The existing normalize-csv-quoting job in this same file already uses that pattern; this aligns with it.

Both bugs together caused: prune ran with all 19 X dates still ancient (no apply_change_indicators because v2023-2 artifact 404'd) → 19 rows removed from source → commit-back failed at push → job aborted before publishing. Net effect: nothing changed remotely, safe to retry.

After this fix, re-tagging 2025-1 should:

  • Pick PREV_TAG=2024-2
  • Successfully download its package-release artifact
  • Apply change indicators (stamping all 19 legacy X dates to 2501)
  • Prune nothing (all X rows now within notice window)
  • Push the reconciled source to main as the release-bot commit

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Merge request reports

Loading