-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (54 loc) · 1.7 KB
/
Copy pathpip-install.yml
File metadata and controls
64 lines (54 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: pip-install
on:
release:
types:
- published
jobs:
build:
name: 'py${{ matrix.python }} on ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04]
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Build
run: |
python -m pip install -U pip build twine setuptools setuptools_scm wheel
python -m build
- name: Test the sdist
run: |
python -m venv venv-sdist
venv-sdist/bin/python -m pip install dist/multiplanet*.tar.gz
venv-sdist/bin/python -c "import multiplanet; print(multiplanet.__version__)"
- name: Test the wheel
run: |
python -m venv venv-wheel
venv-wheel/bin/python -m pip install dist/multiplanet*.whl
venv-wheel/bin/python -c "import multiplanet; print(multiplanet.__version__)"
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-${{ matrix.python }}
path: dist/*
upload_pypi:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1