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 1
1
name : deploy
2
2
3
3
on :
4
+ workflow_dispatch :
5
+ pull_request :
4
6
push :
7
+ branches :
8
+ - main
5
9
tags :
6
10
- v*
7
11
8
12
jobs :
9
- deploy :
13
+ dist :
10
14
runs-on : ubuntu-latest
11
15
steps :
12
- - name : Checkout
13
- uses : actions/checkout@v4
16
+ - uses : actions/checkout@v4
17
+ - uses : hynek/build-and-inspect-python-package@v2
14
18
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
17
24
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
25
27
26
28
- name : Publish package
27
29
uses : pypa/gh-action-pypi-publish@release/v1
28
30
with :
29
- user : __token__
30
31
password : ${{ secrets.pypi_password }}
Original file line number Diff line number Diff line change 37
37
with :
38
38
python-version : ${{ matrix.python-version }}
39
39
40
+ - uses : astral-sh/setup-uv@v3
41
+
40
42
- 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
42
44
43
45
- name : Test packaging
44
46
run : tox -e pkg
57
59
58
60
post-test :
59
61
name : All tests passed
62
+ if : always()
63
+ needs : [test]
60
64
runs-on : ubuntu-latest
61
- needs : test
65
+ timeout-minutes : 2
62
66
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