File tree Expand file tree Collapse file tree 2 files changed +53
-13
lines changed Expand file tree Collapse file tree 2 files changed +53
-13
lines changed Original file line number Diff line number Diff line change 5
5
types : [published]
6
6
7
7
jobs :
8
- publish :
8
+ build-dists :
9
9
runs-on : ubuntu-latest
10
- environment : publish
11
- permissions :
12
- id-token : write
13
10
14
11
steps :
15
12
- uses : actions/checkout@v3
16
13
- uses : actions/setup-python@v4
17
14
with :
18
15
python-version : " 3.11"
19
16
20
- - run : python -m pip install build
21
- - run : python -m build .
17
+ - run : python -m pip install build twine
18
+
19
+ - name : Build Dists
20
+ run : python -m build .
21
+
22
+ - name : Check Dists (twine)
23
+ run : twine check dist/*
24
+
25
+ - uses : actions/upload-artifact@v3
26
+ with :
27
+ name : packages
28
+ path : dist/*
29
+
30
+ publish :
31
+ needs : [build-dists]
32
+ runs-on : ubuntu-latest
33
+ environment : publish-testpypi
34
+ permissions :
35
+ id-token : write
36
+
37
+ steps :
38
+ - uses : actions/download-artifact@v3
39
+ with :
40
+ name : packages
41
+ path : dist
22
42
23
43
- name : Publish to PyPI
24
44
uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 12
12
tags : ["*"]
13
13
14
14
jobs :
15
- publish :
15
+ build-dists :
16
16
runs-on : ubuntu-latest
17
- environment : publish-testpypi
18
- permissions :
19
- id-token : write
20
17
21
18
steps :
22
19
- uses : actions/checkout@v3
23
20
- uses : actions/setup-python@v4
24
21
with :
25
22
python-version : " 3.11"
26
23
27
- - run : python -m pip install build
24
+ - run : python -m pip install build twine
28
25
29
26
- name : Set dev version prior to upload (auto)
30
27
if : ${{ github.event.inputs.devNumber == '' }}
34
31
if : ${{ github.event.inputs.devNumber != '' }}
35
32
run : python ./scripts/set-dev-version.py -n ${{ github.event.inputs.devNumber }}
36
33
37
- - run : python -m build .
34
+ - name : Build Dists
35
+ run : python -m build .
36
+
37
+ - name : Check Dists (twine)
38
+ run : twine check dist/*
39
+
40
+ - uses : actions/upload-artifact@v3
41
+ with :
42
+ name : packages
43
+ path : dist/*
44
+
45
+
46
+ publish :
47
+ needs : [build-dists]
48
+ runs-on : ubuntu-latest
49
+ environment : publish-testpypi
50
+ permissions :
51
+ id-token : write
52
+
53
+ steps :
54
+ - uses : actions/download-artifact@v3
55
+ with :
56
+ name : packages
57
+ path : dist
38
58
39
59
- name : Publish to TestPyPI
40
60
uses : pypa/gh-action-pypi-publish@release/v1
41
61
with :
42
- repository_url : https://test.pypi.org/legacy/
62
+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments