Skip to content

Commit

Permalink
Merge pull request #8 from ap--/ci-deploy-to-pypi
Browse files Browse the repository at this point in the history
ci: add workflow to deploy to pypi
  • Loading branch information
EBjerrum committed Oct 15, 2022
2 parents 778fde7 + 5319ca9 commit 18dbf3e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/run_pytests.yaml
Expand Up @@ -37,3 +37,32 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('tests/conftest.py') }}
- name: Run Tests
run: pytest --cov=./scikit_mol .

# deploy scikit_mol to pypi for tagged commits if tests pass
deploy:
needs: [ tests ]
name: deploy to pypi
runs-on: ubuntu-latest
# this checks that the commit is a tagged commit
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build a binary wheel and a source tarball
run: |
python -m build .
# push all tagged versions to pypi.org
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

0 comments on commit 18dbf3e

Please sign in to comment.