From ec49b2bf090886eadc51853ac45a2920dbc0c34e Mon Sep 17 00:00:00 2001 From: Ghislain Vieilledent Date: Fri, 25 Feb 2022 16:36:58 +0100 Subject: [PATCH] Updating workflows. --- .github/workflows/wheel-pypi.yml | 11 ++++------- .github/workflows/wheel-testpypi.yml | 2 -- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheel-pypi.yml b/.github/workflows/wheel-pypi.yml index 1fbce5f..668f892 100644 --- a/.github/workflows/wheel-pypi.yml +++ b/.github/workflows/wheel-pypi.yml @@ -4,15 +4,14 @@ name: Build wheel and upload to PyPI -# When push on master branch +# When new version on master branch on: - push: - branches: - - 'master' + release: + types: + - published jobs: build_wheels: - if: startsWith(github.event.ref, 'refs/tags/v') name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: @@ -42,7 +41,6 @@ jobs: path: ./wheelhouse/*.whl build_sdist: - if: startsWith(github.event.ref, 'refs/tags/v') name: Build source distribution runs-on: ubuntu-latest steps: @@ -66,7 +64,6 @@ jobs: path: dist/*.tar.gz upload_pypi: - if: startsWith(github.event.ref, 'refs/tags/v') # upload to PyPI on every tag starting with 'v' # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') # alternatively, to publish when a GitHub Release is created, use the following rule: diff --git a/.github/workflows/wheel-testpypi.yml b/.github/workflows/wheel-testpypi.yml index 1b19f70..e3b368d 100644 --- a/.github/workflows/wheel-testpypi.yml +++ b/.github/workflows/wheel-testpypi.yml @@ -20,7 +20,6 @@ on: jobs: build_wheels: - if: startsWith(github.event.ref, 'refs/tags/v') name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: @@ -50,7 +49,6 @@ jobs: path: ./wheelhouse/*.whl build_sdist: - if: startsWith(github.event.ref, 'refs/tags/v') name: Build source distribution runs-on: ubuntu-latest steps: