File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010jobs :
1111 publish :
12- name : Publish release to PyPi
12+ name : Publish ${{ matrix.variant }} release to PyPi
1313 runs-on : ubuntu-latest
1414 strategy :
15+ fail-fast : false
16+ # Ensures the full release publishes before the lite one.
17+ max-parallel : 1
1518 matrix :
16- python-version : [ "3.11" ]
19+ variant : [ full, lite ]
20+ env :
21+ PYTHON_VERSION : " 3.13"
1722 steps :
1823 - uses : actions/checkout@v6
1924
20- - name : Set up Python ${{ matrix.python-version }}
25+ - name : Set up Python ${{ env.PYTHON_VERSION }}
2126 uses : actions/setup-python@v6
2227 with :
23- python-version : ${{ matrix.python-version }}
28+ python-version : ${{ env.PYTHON_VERSION }}
2429
2530 - name : Cache dependencies
2631 uses : actions/cache@v5
3136 ${{ runner.os }}-build-
3237
3338 - name : Install dependencies
34- run : python -m pip install -e '.[build]'
39+ run : |
40+ if [ "${{ matrix.variant }}" = "lite" ]; then
41+ python -m pip install toml
42+ fi
43+ python -m pip install -e '.[build]'
44+
45+ - name : Generate lite TOML
46+ if : matrix.variant == 'lite'
47+ run : |
48+ python scripts/generate_lite_toml.py
49+ cp pyproject-lite.toml pyproject.toml
3550
3651 - name : Build
3752 run : |
4964 run : twine upload --disable-progress-bar --repository testpypi ./dist/*
5065
5166 - name : Upload
67+ if : startsWith(github.ref, 'refs/tags/')
5268 env :
5369 TWINE_NON_INTERACTIVE : " 1"
5470 TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
You can’t perform that action at this time.
0 commit comments