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 55 types : [published]
66
77jobs :
8- publish :
8+ build-dists :
99 runs-on : ubuntu-latest
10- environment : publish
11- permissions :
12- id-token : write
1310
1411 steps :
1512 - uses : actions/checkout@v3
1613 - uses : actions/setup-python@v4
1714 with :
1815 python-version : " 3.11"
1916
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
2242
2343 - name : Publish to PyPI
2444 uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1212 tags : ["*"]
1313
1414jobs :
15- publish :
15+ build-dists :
1616 runs-on : ubuntu-latest
17- environment : publish-testpypi
18- permissions :
19- id-token : write
2017
2118 steps :
2219 - uses : actions/checkout@v3
2320 - uses : actions/setup-python@v4
2421 with :
2522 python-version : " 3.11"
2623
27- - run : python -m pip install build
24+ - run : python -m pip install build twine
2825
2926 - name : Set dev version prior to upload (auto)
3027 if : ${{ github.event.inputs.devNumber == '' }}
3431 if : ${{ github.event.inputs.devNumber != '' }}
3532 run : python ./scripts/set-dev-version.py -n ${{ github.event.inputs.devNumber }}
3633
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
3858
3959 - name : Publish to TestPyPI
4060 uses : pypa/gh-action-pypi-publish@release/v1
4161 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