From 3d9de19813fc6f3964fa496bc88fddfae88bf770 Mon Sep 17 00:00:00 2001 From: dhanshreea Date: Tue, 1 Oct 2024 02:18:49 +0530 Subject: [PATCH] update version [skip ci] --- .github/workflows/publish.yaml | 37 +++++++++++++++++++++++++--------- CITATION.cff | 28 ++++++++++++------------- ersilia/_static_version.py | 2 +- 3 files changed, 43 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 81f2ff1d..66b237da 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -30,10 +30,32 @@ jobs: - name: Create a release tag id: tag + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + # git config http.sslVerify false + # repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" git config --local user.email "ersilia-bot@users.noreply.github.com" git config --local user.name "ersilia-bot" git tag -a "v${{ steps.version.outputs.VERSION }}" -m "v${{ steps.version.outputs.VERSION }}" + # git push "${repo}" origin "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(content) + citation['version'] = os.environ['VERSION'] + with open('CITATION.cff', 'w') as file: + yaml.dump(citation, file, default_flow_style=False, sort_keys=False) + " - name: Commit and push changes done to the static version file and pyproject.toml uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # pin@v1.5 @@ -46,6 +68,7 @@ jobs: amend: true force: true branch: "master" + tags: true gh-release: runs-on: ubuntu-latest @@ -53,17 +76,19 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: + - uses: actions/checkout@v4 - name: Create GitHub release id: gh_release run: | # Get the version file that we updated in the previous job wget https://raw.githubusercontent.com/ersilia-os/ersilia/master/ersilia/_static_version.py - + month=$(date +'%B') year=$(date +'%Y') - title="Release $month $year" + title="$month $year" version=`sed -n 's/.*version = "\([^"]*\)".*/\1/p' _static_version.py` - gh release create "v$version" --title "$title" --notes-from-tag + git fetch --tags + gh release create "v$version" --title "$title" --generate-notes pypi-release: runs-on: ubuntu-latest @@ -77,11 +102,6 @@ jobs: python-version: '3.8' # cache: 'pip' # caching pip dependencies - - name: Get version - run: | - wget https://raw.githubusercontent.com/ersilia-os/ersilia/master/ersilia/_static_version.py - mv _static_version.py ersilia/. - - name: Python Poetry Action uses: abatilo/actions-poetry@v3.0.0 @@ -89,7 +109,6 @@ jobs: env: PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | poetry config -- http-basic.pypi $PYPI_USERNAME $PYPI_PASSWORD poetry --build publish diff --git a/CITATION.cff b/CITATION.cff index 84906669..7f835247 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,17 +1,17 @@ cff-version: 1.2.0 -message: "If you use this software, please cite it as below." +message: If you use this software, please cite it as below. authors: -- family-names: "Turon" - given-names: "Gemma" - orcid: "https://orcid.org/0000-0001-6798-0275" -- family-names: "Arora" - given-names: "Dhanshree" - orcid: "https://orcid.org/0009-0005-1303-4044" -- family-names: "Duran-Frigola" - given-names: "Miquel" - 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 +- family-names: Turon + given-names: Gemma + orcid: https://orcid.org/0000-0001-6798-0275 +- family-names: Arora + given-names: Dhanshree + orcid: https://orcid.org/0009-0005-1303-4044 +- family-names: Duran-Frigola + given-names: Miquel + orcid: https://orcid.org/0000-0002-9906-6936 +title: 'Ersilia Model Hub: a repository of AI/ML models for neglected tropical diseases' +version: 0.1.36 +doi: 10.5281/zenodo.7274645 date-released: 2022-11-02 -url: "https://github.com/ersilia-os/ersilia" +url: https://github.com/ersilia-os/ersilia diff --git a/ersilia/_static_version.py b/ersilia/_static_version.py index ea21bff4..ba70c482 100644 --- a/ersilia/_static_version.py +++ b/ersilia/_static_version.py @@ -1 +1 @@ -version = "0.1.35" +version = "0.1.36"