diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7de5365..f35e59a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,10 +59,3 @@ jobs: coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@master - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - with: - user: ${{ secrets.PYPI_USER }} - password: ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..21c1f45 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: install pypa/build + run: python -m pip install build --user + + - name: build a binary whell and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: ${{ secrets.PYPI_USER }} + password: ${{ secrets.PYPI_PASSWORD }}