Skip to content

Commit affb46a

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

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/release.yaml

Lines changed: 10 additions & 3 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, prereleased ]
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,36 +164,42 @@ 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
169171
with:
170172
name: sdist
171173
path: dist
172174
- uses: actions/download-artifact@v4
175+
continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
173176
with:
174177
name: wheels-ubuntu-22.04-x86_64
175178
path: dist
176179
- uses: actions/download-artifact@v4
180+
continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
177181
with:
178-
name: wheels-macos-11-x86_64
182+
name: wheels-macos-12-x86_64
179183
path: dist
180184
- uses: actions/download-artifact@v4
185+
continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
181186
with:
182187
name: wheels-macos-14-arm64
183188
path: dist
184189
- uses: actions/download-artifact@v4
190+
continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
185191
with:
186192
name: wheels-windows-2022-auto64
187193
path: dist
188194
- uses: actions/download-artifact@v4
195+
continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
189196
with:
190197
name: wheels-windows-2022-auto32
191198
path: dist
192199

193200
- name: Upload Wheels to PyPI
194201
# release on every tag
195-
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
202+
if: ${{ github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') }}
196203
uses: pypa/gh-action-pypi-publish@release/v1
197204
with:
198205
user: __token__

0 commit comments

Comments
 (0)