adamtaranto/Citation Sync Action
Automatically synchronize CITATION.cff version and date with Git tags
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Nov 7, 2025
- License
- MIT
Pinned Snippet
uses: adamtaranto/citation-sync-action@ac28811c239142e9240b702a2cebf7f9226328fc # v1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| token | GitHub token for authentication. Use secrets.GITHUB_TOKEN or a PAT with contents:write permission. | no | ${{ github.token }} |
| citation-path | Path to CITATION.cff file relative to repository root. | no | CITATION.cff |
| target-branch | Branch to push updated CITATION.cff to. If empty, auto-detects default branch. | no | "" |
| update-mode | Update mode: "increment" (default, creates new incremented tag) or "match" (updates to match current tag without increment). | no | increment |
| version-prefix | Expected version tag prefix (e.g., "v", "release-", ""). Empty string for no prefix. | no | v |
| version-format | Expected 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-debug | Enable debug output for troubleshooting. | no | false |
| commit-message | Template for commit message. Use {version} as placeholder for the new version. | no | chore: Update CITATION.cff to version {version} |
| git-user-name | Git user name for commits. | no | github-actions[bot] |
| git-user-email | Git user email for commits. | no | github-actions[bot]@users.noreply.github.com |
| skip-ci | Add [skip ci] to commit message to prevent triggering CI workflows. | no | true |
| fail-on-conflict | Fail if incremented tag already exists (only applies in increment mode). | no | true |
| validate-cff | Validate CITATION.cff format before and after updates. | no | true |
| use-pull-request | Create a pull request instead of pushing directly to the target branch. Required for protected branches. | no | false |
| pr-branch-prefix | Prefix for pull request branch names (only used when use-pull-request is true). | no | citation-sync- |
| pr-title | Title template for pull request. Use {version} as placeholder (only used when use-pull-request is true). | no | Update CITATION.cff to version {version} |
| pr-body | Body template for pull request. Use {version}, {date}, {original_tag} as placeholders (only used when use-pull-request is true). | no | This PR updates CITATION.cff based on tag {original_tag}. |
Outputs
| name | description |
|---|---|
| needs-update | Whether CITATION.cff needed updating (true/false). |
| skipped | Whether the update was skipped due to newer tags existing (true/false). |
| original-tag | The tag that triggered this action. |
| new-tag | The new tag created (if update was needed and mode is increment). Empty in match mode. |
| new-version | The new version written to CITATION.cff. |
| commit-sha | The commit SHA with updated CITATION.cff (if update was needed). |
| target-branch | The branch that was updated (detected or specified). |
| pull-request-number | The pull request number (if use-pull-request is true and update was needed). |
| pull-request-url | The pull request URL (if use-pull-request is true and update was needed). |