File tree Expand file tree Collapse file tree 2 files changed +24
-16
lines changed Expand file tree Collapse file tree 2 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 11name : deploy
22
33on :
4+ workflow_dispatch :
5+ pull_request :
46 push :
7+ branches :
8+ - main
59 tags :
610 - v*
711
812jobs :
9- deploy :
13+ dist :
1014 runs-on : ubuntu-latest
1115 steps :
12- - name : Checkout
13- uses : actions/checkout@v4
16+ - uses : actions/checkout@v4
17+ - uses : hynek/build-and-inspect-python-package@v2
1418
15- - name : Set up Python
16- uses : actions/setup-python@v5
19+ deploy :
20+ runs-on : ubuntu-latest
21+ if : startsWith(github.ref, 'refs/tags/v')
22+ steps :
23+ - uses : actions/download-artifact@v4
1724 with :
18- python-version : ' 3.11'
19-
20- - name : Install dependencies for build
21- run : pip install --upgrade setuptools build
22-
23- - name : Build
24- run : python -m build
25+ name : Packages
26+ path : dist
2527
2628 - name : Publish package
2729 uses : pypa/gh-action-pypi-publish@release/v1
2830 with :
29- user : __token__
3031 password : ${{ secrets.pypi_password }}
Original file line number Diff line number Diff line change 3737 with :
3838 python-version : ${{ matrix.python-version }}
3939
40+ - uses : astral-sh/setup-uv@v3
41+
4042 - name : Install test dependencies
41- run : pip install tox tox-gh-actions
43+ run : uv tool install --with tox-gh-actions --with tox-uv tox
4244
4345 - name : Test packaging
4446 run : tox -e pkg
5759
5860 post-test :
5961 name : All tests passed
62+ if : always()
63+ needs : [test]
6064 runs-on : ubuntu-latest
61- needs : test
65+ timeout-minutes : 2
6266 steps :
63- - run : echo ok
67+ - name : Decide whether the needed jobs succeeded or failed
68+ uses : re-actors/alls-green@release/v1
69+ with :
70+ jobs : ${{ toJSON(needs) }}
You can’t perform that action at this time.
0 commit comments