Skip to content

Commit bcc1fef

Browse files
authored
Add GitHub Actions workflow for citation metadata update
1 parent b838bd1 commit bcc1fef

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update Zenodo and Citation Metadata
2+
3+
on:
4+
push:
5+
paths:
6+
- 'contributors.yaml'
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
update-metadata:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install pyyaml
25+
26+
- name: Generate zenodo.json and CITATION.cff
27+
run: |
28+
python scripts/generate_zenodo.py
29+
30+
- name: Commit changes
31+
run: |
32+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
33+
git config --local user.name "github-actions[bot]"
34+
git add .zenodo.json CITATION.cff
35+
git diff --quiet && git diff --staged --quiet || git commit -m "Update zenodo.json and CITATION.cff from contributors.yaml"
36+
git push

0 commit comments

Comments
 (0)