Skip to content

Commit 79cbf5c

Browse files
authored
Update GitHub Actions workflow to use latest actions
1 parent 086446c commit 79cbf5c

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Build and Publish to PyPI
33
on:
44
release:
55
types: [published]
6-
# Optional: Allow manually running this workflow from the "Actions" tab for testing
76
workflow_dispatch:
87

98
jobs:
@@ -12,23 +11,19 @@ jobs:
1211
runs-on: ${{ matrix.os }}
1312
strategy:
1413
matrix:
15-
# Mac, Windows, and Linux
1614
os: [ubuntu-latest, windows-latest, macos-latest]
1715

1816
steps:
1917
- uses: actions/checkout@v4
2018

21-
# Used to build the wheels
2219
- name: Build wheels
2320
uses: pypa/cibuildwheel@v2.16.5
2421
env:
25-
CIBW_SKIP: "cp36-* cp37-*"
26-
27-
# Ensure we build for both x86_64 and arm64 on Mac (Apple Silicon support)
2822
CIBW_ARCHS_MACOS: x86_64 arm64
2923

30-
- uses: actions/upload-artifact@v3
24+
- uses: actions/upload-artifact@v4
3125
with:
26+
name: cibw-wheels-${{ matrix.os }}
3227
path: ./wheelhouse/*.whl
3328

3429
build_sdist:
@@ -40,24 +35,25 @@ jobs:
4035
- name: Build sdist
4136
run: pipx run build --sdist
4237

43-
- uses: actions/upload-artifact@v3
38+
# UPDATED to v4
39+
- uses: actions/upload-artifact@v4
4440
with:
41+
name: cibw-sdist
4542
path: dist/*.tar.gz
4643

4744
upload_pypi:
4845
needs: [build_wheels, build_sdist]
4946
runs-on: ubuntu-latest
50-
51-
# Only upload to PyPI if this is a Release (not a manual test run)
5247
if: github.event_name == 'release' && github.event.action == 'published'
5348

5449
steps:
55-
- uses: actions/download-artifact@v3
50+
- uses: actions/download-artifact@v4
5651
with:
57-
name: artifact
52+
pattern: cibw-*
5853
path: dist
54+
merge-multiple: true
5955

60-
- uses: pypa/gh-action-pypi-publish@v1.8.10
56+
- uses: pypa/gh-action-pypi-publish@v1.8.14
6157
with:
6258
user: __token__
6359
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)