From 303e8e0966663ac6e789fc86fb509089a4a30b2f Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Thu, 11 Feb 2021 09:27:32 +0100 Subject: [PATCH] Restore build on tag --- .github/workflows/push.yml | 27 ----------------- .github/workflows/tag.yml | 61 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5571f59..3274848 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -37,30 +37,3 @@ jobs: - name: Test with tox run: tox - - release: - runs-on: ubuntu-latest - - if: startsWith(github.ref, 'refs/tags') - - needs: test - - steps: - - uses: actions/checkout@master - - - name: Set up Python 3.9 - uses: actions/setup-python@v1 - with: - python-version: 3.9 - - - name: Install pypa/build - run: python -m pip install build --user - - - name: Build a binary wheel and a source tarball - run: >- - python -m build --sdist --wheel --outdir dist/ . - - - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.pypi_password }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..dee744c --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,61 @@ +name: Tag + +on: + push: + tags: + - '*' + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + max-parallel: 5 + matrix: + python-version: + - 2.7 + - 3.6 + - 3.7 + - 3.8 + - 3.9 + + steps: + - uses: actions/checkout@v1 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + + - name: Test with tox + run: tox + + release: + runs-on: ubuntu-latest + + needs: test + + steps: + - uses: actions/checkout@master + + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Install pypa/build + run: python -m pip install build --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m build --sdist --wheel --outdir dist/ . + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }} \ No newline at end of file