-
Notifications
You must be signed in to change notification settings - Fork 54
82 lines (72 loc) · 2.14 KB
/
Copy pathpypi.yml
File metadata and controls
82 lines (72 loc) · 2.14 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "📦 PyPI "
on:
workflow_dispatch:
permissions:
contents: read
jobs:
# loop_common/loop_interpolation (ROADMAP.md Stage 2) are workspace-local
# deps of LoopStructural (see [tool.uv.sources] in pyproject.toml). They
# must land on PyPI before the LoopStructural sdist below is uploaded, or
# `pip install LoopStructural` breaks for anyone not using uv.
make_sdist_packages:
name: Make SDist (${{ matrix.package }})
runs-on: ubuntu-latest
strategy:
matrix:
package: [loop_common, loop_interpolation]
steps:
- uses: actions/checkout@v4
- name: Build SDist
working-directory: packages/${{ matrix.package }}
run: |
pip install build
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.package }}
path: packages/${{ matrix.package }}/dist/
upload_packages_to_pypi:
name: Upload ${{ matrix.package }} to PyPI
needs: ["make_sdist_packages"]
runs-on: "ubuntu-latest"
strategy:
matrix:
package: [loop_common, loop_interpolation]
steps:
- uses: actions/download-artifact@v4
with:
name: dist-${{ matrix.package }}
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
verbose: true
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SDist
run: |
pip install build
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
upload_to_pypi:
needs: ["make_sdist", "upload_packages_to_pypi"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
verbose: true
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}