From 40dd80110a456fef61e550fd74abe0d1131da29f Mon Sep 17 00:00:00 2001 From: dhanshreea Date: Tue, 1 Oct 2024 02:18:49 +0530 Subject: [PATCH] Update DOI in citation file; add version update in citation to release action --- .github/workflows/publish.yaml | 17 +++++++++++++++++ CITATION.cff | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 81f2ff1d..c78eacf7 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -35,6 +35,23 @@ jobs: git config --local user.name "ersilia-bot" git tag -a "v${{ steps.version.outputs.VERSION }}" -m "v${{ steps.version.outputs.VERSION }}" + - name: Update version in CITATION.cff + id: update-citation + env: + VERSION: ${{ steps.version.outputs.VERSION }} + run: | + pip install PyYAML + python -c " + import os + import yaml + with open('CITATION.cff', 'r') as file: + content = file.read() + citation = yaml.safe_load(file) + citation['version'] = os.environ['VERSION'] + with open('CITATION.cff', 'w') as file: + yaml.dump(citation, file) + " + - name: Commit and push changes done to the static version file and pyproject.toml uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # pin@v1.5 with: diff --git a/CITATION.cff b/CITATION.cff index 84906669..2700bee5 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -12,6 +12,6 @@ authors: orcid: "https://orcid.org/0000-0002-9906-6936" title: "Ersilia Model Hub: a repository of AI/ML models for neglected tropical diseases" version: 1.0.0 -doi: 10.5281/zenodo.7274646 +doi: 10.5281/zenodo.7274645 date-released: 2022-11-02 url: "https://github.com/ersilia-os/ersilia"