feat: auto-update CITATION.cff on version tags, bump to v2.1.5#115
feat: auto-update CITATION.cff on version tags, bump to v2.1.5#115eurunuela merged 2 commits intoME-ICA:masterfrom
Conversation
- Add workflow that triggers on v* tags and updates version and date-released fields in CITATION.cff, then commits back to master - Manually update CITATION.cff from v1.0.17 (2021-12-17) to v2.1.5 (2026-02-25) to reflect the current release Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for rica-fmri ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds automation to keep CITATION.cff release metadata in sync with version tags, and updates the current citation metadata to the latest release.
Changes:
- Add a GitHub Actions workflow that runs on
v*tag pushes and updatesversion:/date-released:inCITATION.cff, committing back to the default branch. - Update
CITATION.cfffromv1.0.17(2021-12-17) tov2.1.5(2026-02-25).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
CITATION.cff |
Bumps citation metadata to v2.1.5 with updated release date. |
.github/workflows/update-citation.yml |
Introduces tag-triggered automation to rewrite and commit citation metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: master | ||
| token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
The workflow is hard-coded to check out and push to master. This repo’s other workflows support both master and main, so this may update the wrong branch (or fail) if the default branch is main. Consider targeting the repository default branch (e.g., ${{ github.event.repository.default_branch }}) for both actions/checkout.ref and the subsequent push destination.
| - name: Update version and date in CITATION.cff | ||
| run: | | ||
| VERSION="${GITHUB_REF_NAME#v}" | ||
| DATE="$(date -u +%Y-%m-%d)" |
There was a problem hiding this comment.
DATE is set from the workflow run time (date -u), which can diverge from the actual release/tag date if a tag is created or pushed later. To keep date-released deterministic and aligned with the tagged commit, consider deriving it from the tag’s target commit timestamp (e.g., via git show -s --format=%cs $GITHUB_SHA).
| DATE="$(date -u +%Y-%m-%d)" | |
| DATE="$(git show -s --format=%cs "$GITHUB_SHA")" |
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add CITATION.cff | ||
| git diff --cached --quiet || git commit -m "chore: update CITATION.cff to ${GITHUB_REF_NAME}" |
There was a problem hiding this comment.
This commit/push back to the default branch will trigger the existing build.yml workflow (it runs on branch pushes). That means a tag push will likely cause two CI runs (one for the tag, one for the follow-up branch commit). If that’s unintended, consider adding a CI-skip marker to the commit message or adjusting the build workflow to ignore CITATION-only commits / github-actions[bot] commits.
| git diff --cached --quiet || git commit -m "chore: update CITATION.cff to ${GITHUB_REF_NAME}" | |
| git diff --cached --quiet || git commit -m "chore: update CITATION.cff to ${GITHUB_REF_NAME} [skip ci]" |
- Use default_branch instead of hardcoded 'master' for checkout and push - Use git commit timestamp (git show --format=%cs) for date-released instead of workflow run time, keeping it aligned with the tagged commit - Add [skip ci] to commit message to avoid a spurious CI run on the follow-up branch push Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
eurunuela
left a comment
There was a problem hiding this comment.
All three points addressed in the follow-up commit:
- Replaced hardcoded
masterwith${{ github.event.repository.default_branch }}for both checkout ref and push target. - Switched to
git show -s --format=%cs "$GITHUB_SHA"for a deterministic commit-aligned date. - Added
[skip ci]to the commit message to suppress the redundant CI run.
Summary
.github/workflows/update-citation.yml— triggers onv*tags and automatically updatesversion:anddate-released:inCITATION.cff, then commits back to masterCITATION.cfffromv1.0.17(2021-12-17) tov2.1.5(2026-02-25) to reflect the current releaseMotivation
CITATION.cffwas stuck at v1.0.17 while the project is now at v2.1.5. The new workflow ensures it stays in sync with every future release automatically.How the workflow works
v*tag pushmasterwith write permissionsvprefix from the tag name to get the bare versionsedto updateversion:anddate-released:in-placeTest plan
v2.1.6) and verifyCITATION.cffis committed to master with updated fields🤖 Generated with Claude Code