Skip to content

Commit

Permalink
Updating workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed Feb 25, 2022
1 parent 6ff3d93 commit ec49b2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/wheel-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/wheel-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ec49b2b

Please sign in to comment.