Skip to content

Commit

Permalink
update version [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
DhanshreeA committed Oct 1, 2024
1 parent f96af14 commit 01960ed
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 24 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,51 +68,51 @@ jobs:
amend: true
force: true
branch: "master"
tags: true

gh-release:
runs-on: ubuntu-latest
needs: version
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
needs: version
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v3.5.3
with:
ref: master

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # pin@v5.2.0
with:
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

- name: Build and publish
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

run: |
git pull origin master
poetry config -- http-basic.pypi $PYPI_USERNAME $PYPI_PASSWORD
poetry --build publish
Expand Down
28 changes: 14 additions & 14 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ersilia/_static_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "0.1.35"
version = "0.1.36"

0 comments on commit 01960ed

Please sign in to comment.