@@ -49,18 +49,18 @@ jobs:
49
49
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
50
50
buildplat :
51
51
- [ubuntu-22.04, manylinux_x86_64, ""]
52
- - [ubuntu-22.04, musllinux_x86_64, ""]
53
- - [ubuntu-22.04-arm, manylinux_aarch64, ""]
54
- - [ubuntu-22.04-arm, musllinux_aarch64, ""]
55
- - [macos-13, macosx_x86_64, openblas]
56
-
57
- # targeting macos >= 14. Could probably build on macos-14, but it would be a cross-compile
58
- - [macos-13, macosx_x86_64, accelerate]
59
- - [macos-14, macosx_arm64, openblas]
60
- - [macos-14, macosx_arm64, accelerate]
61
- - [windows-2022, win_amd64, ""]
62
- - [windows-2022, win32, ""]
63
- - [windows-11-arm, win_arm64, ""]
52
+ # - [ubuntu-22.04, musllinux_x86_64, ""]
53
+ # - [ubuntu-22.04-arm, manylinux_aarch64, ""]
54
+ # - [ubuntu-22.04-arm, musllinux_aarch64, ""]
55
+ # - [macos-13, macosx_x86_64, openblas]
56
+ #
57
+ # # targeting macos >= 14. Could probably build on macos-14, but it would be a cross-compile
58
+ # - [macos-13, macosx_x86_64, accelerate]
59
+ # - [macos-14, macosx_arm64, openblas]
60
+ # - [macos-14, macosx_arm64, accelerate]
61
+ # - [windows-2022, win_amd64, ""]
62
+ # - [windows-2022, win32, ""]
63
+ # - [windows-11-arm, win_arm64, ""]
64
64
python : ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t", "pp311"]
65
65
exclude :
66
66
# Don't build PyPy 32-bit windows
@@ -239,10 +239,37 @@ jobs:
239
239
print-hash : true
240
240
attestations : true
241
241
242
+ check_version :
243
+ name : Ensure commit is tag before upload to PyPi
244
+
245
+ # if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi'
246
+ needs : [build_wheels, build_sdist]
247
+ runs-on : ubuntu-latest
248
+ steps :
249
+ - name : Checkout numpy
250
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
251
+ with :
252
+ repository : numpy/numpy
253
+ ref : ${{ env.SOURCE_REF_TO_BUILD }}
254
+ path : numpy-src
255
+ submodules : true
256
+ persist-credentials : false
257
+
258
+ - name : Examine git commit
259
+ run : |
260
+ pwd
261
+ hash=$(git describe HEAD)
262
+ if [[ $hash == *"-"*"-"* ]]; then
263
+ echo "Build version is not a tag"
264
+ exit 1
265
+ else
266
+ echo "Build version is a tag"
267
+ fi;
268
+
242
269
pypi-publish :
243
270
name : Publish release to PyPI
244
271
if : github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi'
245
- needs : [build_wheels, build_sdist ]
272
+ needs : [check_version ]
246
273
runs-on : ubuntu-latest
247
274
environment :
248
275
name : pypi
0 commit comments