Skip to content

Commit e79ee64

Browse files
committed
Ignore releases and upload on tags instead.
This skips a redundant job when new versions are released.
1 parent 55f8cf4 commit e79ee64

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

.github/workflows/python-package-macos.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Python package (MacOS)
33
on:
44
push:
55
pull_request:
6-
release:
7-
types: [created]
86

97
jobs:
108
build:
@@ -53,7 +51,7 @@ jobs:
5351
path: wheelhouse/*.whl
5452
retention-days: 1
5553
- name: Upload to PyPI
56-
if: github.event_name == 'release'
54+
if: startsWith(github.ref, 'refs/tags/')
5755
env:
5856
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
5957
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/python-package.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ name: Package
66
on:
77
push:
88
pull_request:
9-
release:
10-
types: [created]
119

1210
defaults:
1311
run:
@@ -68,7 +66,7 @@ jobs:
6866
xvfb-run --auto-servernum pytest --cov-report=xml
6967
- uses: codecov/codecov-action@v1
7068
- name: Upload to PyPI
71-
if: github.event_name == 'release' && runner.os != 'Linux'
69+
if: startsWith(github.ref, 'refs/tags/') && runner.os != 'Linux'
7270
env:
7371
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
7472
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)