File tree 1 file changed +74
-0
lines changed
1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ tags :
4
+ - " *"
5
+ branches :
6
+ - test-release
7
+
8
+ jobs :
9
+ release-build :
10
+ name : Build distribution
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+
15
+ - name : Install uv
16
+ uses : astral-sh/setup-uv@v3
17
+
18
+ - name : " Set up Python"
19
+ uses : actions/setup-python@v5
20
+ with :
21
+ python-version-file : " .python-version"
22
+
23
+ - name : Install the project
24
+ run : uv sync --all-extras --dev
25
+
26
+ - name : Build
27
+ run : uv build
28
+
29
+ - name : Upload artifacts
30
+ uses : actions/upload-artifact@v4
31
+ with :
32
+ name : release-dists
33
+ path : dist/
34
+
35
+ pypi-publish :
36
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
37
+ name : Upload release to PyPI
38
+ runs-on : ubuntu-latest
39
+ environment : release
40
+ needs :
41
+ - release-build
42
+ permissions :
43
+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
44
+
45
+ steps :
46
+ - name : Retrieve release distributions
47
+ uses : actions/download-artifact@v4
48
+ with :
49
+ name : release-dists
50
+ path : dist/
51
+
52
+ - name : Publish package distributions to PyPI
53
+ uses : pypa/gh-action-pypi-publish@release/v1
54
+
55
+ test-pypi-publish :
56
+ name : Upload release to PyPI
57
+ runs-on : ubuntu-latest
58
+ environment : release
59
+ needs :
60
+ - release-build
61
+ permissions :
62
+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
63
+
64
+ steps :
65
+ - name : Retrieve release distributions
66
+ uses : actions/download-artifact@v4
67
+ with :
68
+ name : release-dists
69
+ path : dist/
70
+
71
+ - name : Publish package distributions to TestPyPI
72
+ uses : pypa/gh-action-pypi-publish@release/v1
73
+ with :
74
+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments