@@ -196,8 +196,11 @@ jobs:
196
196
fetch-depth : 0 # Fetch everything to get accurately versioned tag.
197
197
- uses : actions/setup-python@v5
198
198
name : Install Python
199
- - name : Install cibuildwheel twine wheel
200
- run : python -m pip install cibuildwheel twine wheel
199
+ - name : Install cibuildwheel build
200
+ run : python -m pip install cibuildwheel build
201
+ - name : Build sdist
202
+ if : ${{runner.os == 'Linux' && matrix.cibw_archs_linux == 'x86_64'}}
203
+ run : python -m build --sdist
201
204
- name : Install build dependencies (Macos)
202
205
run : brew install nasm
203
206
if : runner.os == 'macOS'
@@ -251,26 +254,20 @@ jobs:
251
254
PYTHON_ISAL_BUILD_CACHE=True
252
255
PYTHON_ISAL_BUILD_CACHE_FILE=${{ runner.temp }}/build_cache
253
256
CFLAGS="-g0 -DNDEBUG"
254
- - name : Build sdist
255
- if : ${{runner.os == 'Linux' && matrix.cibw_archs_linux == 'x86_64'}}
256
- run : |
257
- pip install build
258
- python -m build --sdist
259
257
- uses : actions/upload-artifact@v4
260
258
with :
261
259
name : " dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw_archs_linux }}"
262
260
path : " dist/"
263
261
- name : Publish package to TestPyPI
264
- # pypa/gh-action-pypi-publish@master does not work on OSX
265
- # Alpha, Beta and dev releases contain a - in the tag.
266
262
if : contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
267
- run : twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
268
- env :
269
- TWINE_USERNAME : __token__
270
- TWINE_PASSWORD : ${{ secrets.TEST_PYPI_API_TOKEN }}
263
+ uses : pypa/gh-action-pypi-publish@release/v1
264
+ with :
265
+ repository-url : " https://test.pypi.org/legacy/"
266
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
267
+ skip-existing : true
271
268
- name : Publish package to PyPI
272
269
if : " !contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')"
273
- run : twine upload --skip-existing dist/*
274
- env :
275
- TWINE_USERNAME : __token__
276
- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
270
+ uses : pypa/gh-action-pypi-publish@release/v1
271
+ with :
272
+ password : ${{ secrets.PYPI_API_TOKEN }}
273
+ skip-existing : true
0 commit comments