File tree 1 file changed +36
-4
lines changed
1 file changed +36
-4
lines changed Original file line number Diff line number Diff line change 4
4
release :
5
5
types : [published]
6
6
7
+ permissions :
8
+ contents : read
9
+
7
10
jobs :
11
+ release-build :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+
17
+ - uses : actions/setup-python@v5
18
+ with :
19
+ python-version : " 3.x"
20
+
21
+ - name : Build release distributions
22
+ run : |
23
+ python -m pip install build
24
+ python setup.py sdist bdist_wheel
25
+
26
+ - name : Upload distributions
27
+ uses : actions/upload-artifact@v4
28
+ with :
29
+ name : release-dists
30
+ path : dist/
31
+
8
32
pypi-publish :
9
- name : upload release to PyPI
10
33
runs-on : ubuntu-latest
11
- environment : pypi
34
+ needs :
35
+ - release-build
12
36
permissions :
13
37
id-token : write
38
+ environment :
39
+ name : pypi
14
40
steps :
15
- - name : Publish package distributions to PyPI
41
+ - name : Retrieve release distributions
42
+ uses : actions/download-artifact@v4
43
+ with :
44
+ name : release-dists
45
+ path : dist/
46
+
47
+ - name : Publish release distributions to PyPI
16
48
uses : pypa/gh-action-pypi-publish@release/v1
17
49
with :
18
- python-version : ' 3.x '
50
+ packages-dir : dist/
You can’t perform that action at this time.
0 commit comments