Skip to content

Convert CITATION.cff to other formats #4

Convert CITATION.cff to other formats

Convert CITATION.cff to other formats #4

Workflow file for this run

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{wood2021,/' 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