adamtaranto/Citation Sync Action

Automatically synchronize CITATION.cff version and date with Git tags

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Maintainedlast commit Nov 7, 2025
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: adamtaranto/citation-sync-action@ac28811c239142e9240b702a2cebf7f9226328fc # v1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
tokenGitHub token for authentication. Use secrets.GITHUB_TOKEN or a PAT with contents:write permission.no${{ github.token }}
citation-pathPath to CITATION.cff file relative to repository root.noCITATION.cff
target-branchBranch to push updated CITATION.cff to. If empty, auto-detects default branch.no""
update-modeUpdate mode: "increment" (default, creates new incremented tag) or "match" (updates to match current tag without increment).noincrement
version-prefixExpected version tag prefix (e.g., "v", "release-", ""). Empty string for no prefix.nov
version-formatExpected semantic version format regex. Default validates X.Y.Z format with optional pre-release suffix.no^([0-9]+)\.([0-9]+)\.([0-9]+)(-[a-zA-Z0-9.-]+)?$
enable-debugEnable debug output for troubleshooting.nofalse
commit-messageTemplate for commit message. Use {version} as placeholder for the new version.nochore: Update CITATION.cff to version {version}
git-user-nameGit user name for commits.nogithub-actions[bot]
git-user-emailGit user email for commits.nogithub-actions[bot]@users.noreply.github.com
skip-ciAdd [skip ci] to commit message to prevent triggering CI workflows.notrue
fail-on-conflictFail if incremented tag already exists (only applies in increment mode).notrue
validate-cffValidate CITATION.cff format before and after updates.notrue
use-pull-requestCreate a pull request instead of pushing directly to the target branch. Required for protected branches.nofalse
pr-branch-prefixPrefix for pull request branch names (only used when use-pull-request is true).nocitation-sync-
pr-titleTitle template for pull request. Use {version} as placeholder (only used when use-pull-request is true).noUpdate CITATION.cff to version {version}
pr-bodyBody template for pull request. Use {version}, {date}, {original_tag} as placeholders (only used when use-pull-request is true).noThis PR updates CITATION.cff based on tag {original_tag}.
namedescription
needs-updateWhether CITATION.cff needed updating (true/false).
skippedWhether the update was skipped due to newer tags existing (true/false).
original-tagThe tag that triggered this action.
new-tagThe new tag created (if update was needed and mode is increment). Empty in match mode.
new-versionThe new version written to CITATION.cff.
commit-shaThe commit SHA with updated CITATION.cff (if update was needed).
target-branchThe branch that was updated (detected or specified).
pull-request-numberThe pull request number (if use-pull-request is true and update was needed).
pull-request-urlThe pull request URL (if use-pull-request is true and update was needed).