4
4
push :
5
5
branches : [ main ]
6
6
release :
7
- types : [ created ]
7
+ types : [ released, prereleased ]
8
8
pull_request : # also build on PRs touching this file
9
9
paths :
10
10
- " .github/workflows/release.yaml"
57
57
build_wheels :
58
58
name : Build ${{ matrix.arch }} wheels on ${{ matrix.os }}
59
59
runs-on : ${{ matrix.os }}
60
+ continue-on-error : ${{ github.event_name == 'push' && github.ref_type != 'tag' }}
60
61
strategy :
61
62
fail-fast : false
62
63
matrix :
@@ -163,36 +164,42 @@ jobs:
163
164
publish :
164
165
name : Publish on PyPI
165
166
needs : [make_sdist,build_wheels]
167
+ if : ${{ github.repository_owner == 'pyproj4' && github.event_name != 'pull_request' }}
166
168
runs-on : ubuntu-latest
167
169
steps :
168
170
- uses : actions/download-artifact@v4
169
171
with :
170
172
name : sdist
171
173
path : dist
172
174
- uses : actions/download-artifact@v4
175
+ continue-on-error : ${{ github.event_name == 'push' && github.ref_type != 'tag' }}
173
176
with :
174
177
name : wheels-ubuntu-22.04-x86_64
175
178
path : dist
176
179
- uses : actions/download-artifact@v4
180
+ continue-on-error : ${{ github.event_name == 'push' && github.ref_type != 'tag' }}
177
181
with :
178
- name : wheels-macos-11 -x86_64
182
+ name : wheels-macos-12 -x86_64
179
183
path : dist
180
184
- uses : actions/download-artifact@v4
185
+ continue-on-error : ${{ github.event_name == 'push' && github.ref_type != 'tag' }}
181
186
with :
182
187
name : wheels-macos-14-arm64
183
188
path : dist
184
189
- uses : actions/download-artifact@v4
190
+ continue-on-error : ${{ github.event_name == 'push' && github.ref_type != 'tag' }}
185
191
with :
186
192
name : wheels-windows-2022-auto64
187
193
path : dist
188
194
- uses : actions/download-artifact@v4
195
+ continue-on-error : ${{ github.event_name == 'push' && github.ref_type != 'tag' }}
189
196
with :
190
197
name : wheels-windows-2022-auto32
191
198
path : dist
192
199
193
200
- name : Upload Wheels to PyPI
194
201
# release on every tag
195
- if : github.event_name == 'release' && startsWith( github.ref, 'refs/tags/')
202
+ if : ${{ github.event_name == 'release' && github.ref_type == 'tag' }}
196
203
uses : pypa/gh-action-pypi-publish@release/v1
197
204
with :
198
205
user : __token__
@@ -201,7 +208,8 @@ jobs:
201
208
# repository_url: https://test.pypi.org/legacy/ # To test
202
209
203
210
204
- - name : Upload Nightly Wheels
211
+ - name : Upload Nightly Wheelsref
212
+ if : ${{ github.ref_type == "branch" && github.ref_name == "main" }}
205
213
uses : scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc
206
214
with :
207
215
artifacts_path : dist
0 commit comments