Skip to content

Commit 1fffc8b

Browse files
committed
Update pip-install.yml workflow to match BigPlanet configuration
Modernize the pip-install workflow following the working BigPlanet template: - Update Python versions from 3.7-3.9 to 3.9-3.14 (matching project requirements) - Update OS matrix to use specific versions: macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04 - Upgrade GitHub Actions versions: - actions/checkout@v3 → v4 - actions/setup-python@v4 → v5 - actions/upload-artifact@v3 → v4 - actions/download-artifact@v3 → v4 - Add allow-prereleases flag for Python 3.14 support - Replace deprecated pep517 with modern python -m build - Update build dependencies: add build, setuptools, wheel - Add artifact naming to prevent conflicts in multi-job builds - Modernize PyPI upload: - Use trusted publishing with id-token permissions - Update to pypa/gh-action-pypi-publish@release/v1 - Remove deprecated password-based authentication - Add merge-multiple for artifact downloads This ensures the release workflow follows current GitHub Actions and PyPI best practices.
1 parent 5584340 commit 1fffc8b

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/pip-install.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,28 @@ on:
88
jobs:
99

1010
build:
11-
name: Build wheels on ${{ matrix.os }}
11+
name: 'py${{ matrix.python }} on ${{ matrix.os }}'
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest, macos-latest]
16-
python: ['3.7', '3.8', '3.9']
15+
os: [macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04]
16+
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
fetch-depth: 0
2222

23-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v5
2424
name: Install Python
2525
with:
2626
python-version: ${{ matrix.python }}
27+
allow-prereleases: true
2728

2829
- name: Build
2930
run: |
30-
python -m pip install -U pip pep517 twine setuptools_scm astropy
31-
python -m pep517.build .
31+
python -m pip install -U pip build twine setuptools setuptools_scm wheel
32+
python -m build
3233
3334
- name: Test the sdist
3435
run: |
@@ -42,21 +43,22 @@ jobs:
4243
venv-wheel/bin/python -m pip install dist/vspace*.whl
4344
venv-wheel/bin/python -c "import vspace; print(vspace.__version__)"
4445
45-
- uses: actions/upload-artifact@v3
46+
- uses: actions/upload-artifact@v4
4647
with:
48+
name: dist-${{ matrix.os }}-${{ matrix.python }}
4749
path: dist/*
4850

4951
upload_pypi:
5052
needs: [build]
5153
runs-on: ubuntu-latest
5254
if: github.event_name == 'release' && github.event.action == 'published'
55+
permissions:
56+
id-token: write
5357
steps:
54-
- uses: actions/download-artifact@v3
58+
- uses: actions/download-artifact@v4
5559
with:
56-
name: artifact
60+
pattern: dist-*
5761
path: dist
62+
merge-multiple: true
5863

59-
- uses: pypa/gh-action-pypi-publish@master
60-
with:
61-
user: __token__
62-
password: ${{ secrets.pypi_password }}
64+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)