Skip to content

Commit 7494d3c

Browse files
committed
CI/CD: Update build and release github action files.
1 parent 05cee5a commit 7494d3c

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

.github/workflows/build-and-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
os: [ ubuntu-20.04, macOS-12, windows-2019 ]
21+
os: [ ubuntu-20.04, macOS-13, windows-2019 ]
2222
python-version: [ '3.10', 'pypy3.10', '3.11', '3.12', '3.13' ]
2323
fail-fast: false
2424

.github/workflows/release.yml

+14-13
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
os: [ ubuntu-20.04, macOS-12, windows-2019 ]
20+
os: [ ubuntu-20.04, macOS-13, windows-2019 ]
2121
fail-fast: false
2222

2323
steps:
@@ -35,20 +35,16 @@ jobs:
3535
- name: Set up Python
3636
uses: actions/setup-python@v5
3737
with:
38-
python-version: '3.10'
38+
python-version: '3.11'
3939

4040
- name: Cythonize C-extensions
4141
run: |
42-
python3 -m pip install --upgrade pip cibuildwheel==2.19.2
42+
python3 -m pip install --upgrade pip cibuildwheel
4343
python3 -m pip install -r requirements-dev.txt
4444
cythonize polyagamma/*.pyx
4545
4646
- name: Build wheels
47-
uses: pypa/[email protected]
48-
with:
49-
package-dir: .
50-
output-dir: wheelhouse
51-
config-file: "pyproject.toml"
47+
run: python -m cibuildwheel --output-dir wheelhouse --config-file pyproject.toml
5248

5349
- name: Build source distribution
5450
if: ${{ matrix.os == 'ubuntu-20.04' }}
@@ -60,11 +56,12 @@ jobs:
6056
mv dist/*.gz wheelhouse
6157
6258
- name: Store the wheelhouse directory
63-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
6460
with:
65-
name: wheels_and_sdist
61+
name: wheels_and_sdist-${{ matrix.os }}
6662
path: wheelhouse
6763
if-no-files-found: error
64+
overwrite: true
6865

6966
upload_pypi:
7067
needs: [ build_wheels_and_sdist ]
@@ -76,12 +73,16 @@ jobs:
7673
id-token: write
7774
steps:
7875
- name: Pull built wheels and sdist
79-
uses: actions/download-artifact@v3
76+
uses: actions/download-artifact@v4
8077
with:
81-
name: wheels_and_sdist
8278
path: wheelhouse
79+
pattern: wheels_and_sdist-*
80+
merge-multiple: true
81+
82+
- name: Display structure of downloaded files
83+
run: ls -R wheelhouse
8384

8485
- name: Publish to PyPI
85-
uses: pypa/gh-action-pypi-publish@v1.8.10
86+
uses: pypa/gh-action-pypi-publish@release/v1
8687
with:
8788
packages_dir: wheelhouse

0 commit comments

Comments
 (0)