Publish to pypi on github release published (#287)

* Publish to pypi on github release published, remove testpypi

* Remove release tag check
This commit is contained in:
Teemu R 2022-01-14 16:32:48 +01:00 committed by GitHub
parent 6ece506a3b
commit 255c0c9a25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,7 @@
name: Publish packages
on:
push:
branches:
- master
release:
types: [published]
jobs:
build-n-publish:
@ -30,15 +29,7 @@ jobs:
--wheel
--outdir dist/
.
- name: Publish on test pypi
uses: pypa/gh-action-pypi-publish@master
continue-on-error: true
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish release on pypi
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}