From 261116a7cb2e85985b9306fc068a8913af25ffaf Mon Sep 17 00:00:00 2001 From: Paullo9 Date: Sat, 31 Oct 2026 10:39:17 +0100 Subject: [PATCH] ci: release-please dates CITATION.cff itself; drop the sed step release-please has a date updater after all: the generic updater (release-please 16.17 and later, bundled in release-please-action v4) replaces the YYYY-MM-DD on a line marked `x-release-please-date` with the day of the run. The date-released line in CITATION.cff now carries that annotation, so the date is written in the same Release PR commit as the version, and the workflow step that cloned the Release PR branch, ran sed and pushed a second commit is removed. Done: date-released follows each Release PR without the extra step. Next: check the date line in the next Release PR. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-please.yml | 16 ---------------- CITATION.cff | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 471668d..9755a22 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -43,22 +43,6 @@ jobs: token: ${{ steps.app.outputs.token || github.token }} config-file: release-please-config.json manifest-file: .release-please-manifest.json - # release-please bumps the CITATION.cff version (extra-files) but has no updater for dates: this step sets - # date-released to the day of the run on the Release PR's branch, so the merged Release PR carries its own date. - - name: Date CITATION.cff on the Release PR - if: steps.release.outputs.pr - run: | - branch=$(jq -r .headBranchName <<<"$PR") - git clone --quiet --depth 1 --branch "$branch" "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" release-pr - cd release-pr - sed -i -E "s/^date-released: \"[0-9-]+\"/date-released: \"$(date -u +%F)\"/" CITATION.cff - if git diff --quiet; then exit 0; fi - git -c user.name="github-actions[bot]" -c user.email="41898283+github-actions[bot]@users.noreply.github.com" \ - commit --quiet -am "chore: date CITATION.cff for the release" - git push --quiet origin "HEAD:$branch" - env: - PR: ${{ steps.release.outputs.pr }} - GH_TOKEN: ${{ steps.app.outputs.token || github.token }} - name: Run CI on the Release PR if: steps.release.outputs.pr && steps.app.outputs.token == '' run: gh workflow run ci.yml --repo "$GITHUB_REPOSITORY" --ref "$(jq -r .headBranchName <<<"$PR")" diff --git a/CITATION.cff b/CITATION.cff index 83e7214..306e87e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -10,7 +10,7 @@ authors: - family-names: Lobpreis given-names: Paul version: "0.11.0" # x-release-please-version -date-released: "2026-10-22" +date-released: "2026-10-22" # x-release-please-date license: GPL-3.0-only repository-code: "https://github.com/mac4DSTEM/FormatoKit" keywords: