File tree Expand file tree Collapse file tree 1 file changed +40
-11
lines changed Expand file tree Collapse file tree 1 file changed +40
-11
lines changed Original file line number Diff line number Diff line change 1
- name : Build & test
1
+ name : Test & release
2
2
3
3
on :
4
4
push :
16
16
workflow_dispatch :
17
17
18
18
jobs :
19
- build :
20
- name : Build & verify package
19
+ check :
20
+ name : Check
21
21
runs-on : ubuntu-latest
22
22
23
+ strategy :
24
+ fail-fast : false
25
+ matrix :
26
+ python-version :
27
+ - " 3.10"
28
+ - " 3.11"
29
+ - " 3.12"
30
+
23
31
steps :
24
32
- name : Checkout
25
33
uses : actions/checkout@v4
29
37
with :
30
38
enable-cache : true
31
39
32
- - name : Configure version
33
- if : github.event.action == 'published'
34
- run : ./.github/set-version
40
+ - name : Install Python
41
+ run : uv python install ${{ matrix.python-version }}
35
42
36
43
- name : Test
37
44
run : make test
@@ -45,21 +52,43 @@ jobs:
45
52
- name : format
46
53
run : uv run ruff format --diff
47
54
55
+ # Just test the build works, we'll upload the one in the next job
56
+ # instead, if needed.
48
57
- name : Build
49
58
run : make build
50
59
51
- - name : Upload package
60
+ build :
61
+ name : Build package
62
+ needs : check
63
+ if : github.event.action == 'published'
64
+ runs-on : ubuntu-latest
65
+
66
+ steps :
67
+ - name : Checkout
68
+ uses : actions/checkout@v4
69
+
70
+ - name : Install the latest version of uv
71
+ uses : astral-sh/setup-uv@v3
72
+ with :
73
+ enable-cache : true
74
+
75
+ - name : Configure version
52
76
if : github.event.action == 'published'
77
+ run : ./.github/set-version
78
+
79
+ - name : Build
80
+ run : make build
81
+
82
+ - name : Upload package
53
83
uses : actions/upload-artifact@v4
54
84
with :
55
85
name : Packages
56
86
path : dist/*
57
87
58
- release :
59
- name : Publish
60
- runs-on : ubuntu-latest
61
- if : github.event.action == 'published'
88
+ publish :
89
+ name : Publish package
62
90
needs : build
91
+ runs-on : ubuntu-latest
63
92
environment : pypi-release
64
93
65
94
permissions :
You can’t perform that action at this time.
0 commit comments