From e7cdfefc58924ba8d261f0d3701bc060c59f6ec4 Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Tue, 26 Oct 2021 11:09:32 -0300 Subject: [PATCH] Separate tests and release workflows --- .github/workflows/main.yml | 7 ------- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/release.yml 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 }}