-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.26 KB
/
cff_convert.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: "Convert CITATION.cff"
run-name: Convert CITATION.cff to other formats
on:
push:
branches: main
paths: CITATION.cff
workflow_dispatch:
jobs:
convert:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4
- name: Convert CITATION.cff to Bibtex
uses: citation-file-format/[email protected]
with:
args: "--infile ./CITATION.cff --format bibtex --outfile citation_bibtex.bib"
- name: Modify Bibtex entry
run: sed -i 's/@misc{YourReferenceHere,/@software{stars_reproduce_allen_2020,/' citation_bibtex.bib
- name: Convert CITATION.cff to APA
uses: citation-file-format/[email protected]
with:
args: "--infile ./CITATION.cff --format apalike --outfile citation_apalike.apa"
- name: Commit and push the citation files
run: |
git config --global user.name 'cffconvert GitHub Action'
git config --global user.email '[email protected]'
git add citation_bibtex.bib
git add citation_apalike.apa
git commit --allow-empty -m "chore(citation): auto update .bib and .apa"
git push