File tree Expand file tree Collapse file tree 1 file changed +31
-8
lines changed
Expand file tree Collapse file tree 1 file changed +31
-8
lines changed Original file line number Diff line number Diff line change 66 - ' v[0-9]+.[0-9]+.[0-9]+'
77
88jobs :
9- deploy-job :
10- name : Build and deploy
9+ build :
10+ name : Build
1111 runs-on : ubuntu-latest
12- environment : pypi
1312 steps :
14- - name : Check out repository code
13+ - name : Check out code
1514 uses : actions/checkout@v4
15+
1616 - name : Install Python
1717 uses : actions/setup-python@v4
1818 with :
1919 python-version : ' 3.10'
20+
2021 - name : Install dependencies
2122 run : |
2223 python -m pip install twine build
2324 python -m pip install -e .
24- - name : Build package locally
25+
26+ - name : Build package
2527 run : |
2628 python -m build
2729 python -m twine check dist/*
28- - name : Upload package to PyPI
29- run : |
30- python -m twine upload -r pypi dist/* --verbose
30+
31+ - name : Upload artifacts
32+ uses : actions/upload-artifact@v4
33+ with :
34+ path : ./dist
35+
36+ publish :
37+ name : Publish
38+ needs : [build]
39+ runs-on : ubuntu-latest
40+ environment : pypi
41+ permissions :
42+ id-token : write
43+ steps :
44+ - name : Download artifacts
45+ uses : actions/download-artifact@v4
46+
47+ - name : Publish to TestPyPI
48+ uses : pypa/gh-action-pypi-publish@release/v1
49+ with :
50+ repository-url : https://test.pypi.org/legacy/
51+
52+ - name : Publish to PyPI
53+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments