Skip to content

Merge pull request #36 from Novartis/master #146

Merge pull request #36 from Novartis/master

Merge pull request #36 from Novartis/master #146

name: Package Builds
on: push
jobs:
build-n-publish:
name: Build and publish packages to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install python packages
run: pip install tox
- name: Tox
run: tox -e package
- name: Publish to test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to tagged release to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}