Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,34 @@ on:
- "v*"

jobs:
update-citation:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.BOT_TOKEN }}

- name: Update CITATION.cff
run: |
VERSION="${GITHUB_REF_NAME}"
DATE=$(date +%Y-%m-%d)
yq -i ".version = \"$VERSION\"" CITATION.cff
yq -i ".[\"date-released\"] = \"$DATE\"" CITATION.cff
yq -i ".title = \"John-Ragland/pygenray: $VERSION\"" CITATION.cff

- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CITATION.cff
git diff --staged --quiet || git commit -m "chore: update CITATION.cff for ${GITHUB_REF_NAME}"
git push origin main

build:
needs: update-citation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ authors:
title: "John-Ragland/pygenray: Initial Release"
version: v0.0.1
date-released: 2025-07-01
doi: 10.5281/zenodo.15783848
url: "https://github.com/John-Ragland/pygenray"
Loading