Skip to content

Commit 8ae0456

Browse files
committed
CI: continue publishing wheels when non-release
1 parent 6133254 commit 8ae0456

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ main ]
66
release:
7-
types: [ created ]
7+
types: [ released ]
88
pull_request: # also build on PRs touching this file
99
paths:
1010
- ".github/workflows/release.yaml"
@@ -57,6 +57,7 @@ jobs:
5757
build_wheels:
5858
name: Build ${{ matrix.arch }} wheels on ${{ matrix.os }}
5959
runs-on: ${{ matrix.os }}
60+
continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
6061
strategy:
6162
fail-fast: false
6263
matrix:
@@ -163,6 +164,7 @@ jobs:
163164
publish:
164165
name: Publish on PyPI
165166
needs: [make_sdist,build_wheels]
167+
if: github.event_name != 'pull_request'
166168
runs-on: ubuntu-latest
167169
steps:
168170
- uses: actions/download-artifact@v4
@@ -192,7 +194,7 @@ jobs:
192194

193195
- name: Upload Wheels to PyPI
194196
# release on every tag
195-
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
197+
if: ${{ github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') }}
196198
uses: pypa/gh-action-pypi-publish@release/v1
197199
with:
198200
user: __token__

0 commit comments

Comments
 (0)