File tree Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish python PyPI test
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ build-release :
9
+ name : Build and publish to TestPyPI
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ with :
14
+ fetch-depth : 0
15
+ - name : Set up Python
16
+ uses : actions/setup-python@v3
17
+ with :
18
+ python-version : 3.9
19
+ - name : Installing package
20
+ run : |
21
+ pip3 install .
22
+ pip3 install .[pypi]
23
+ - name : Build Package
24
+ run : |
25
+ python -m build --no-isolation
26
+ - name : Publish package to PyPI
27
+ uses : pypa/gh-action-pypi-publish@release/v1
28
+ with :
29
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
30
+ repository_url : https://pypi.org/legacy/
Original file line number Diff line number Diff line change
1
+ name : Publish python PyPI test
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ build-release :
10
+ name : Build and publish to TestPyPI
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ with :
15
+ fetch-depth : 0
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v3
18
+ with :
19
+ python-version : 3.9
20
+ - name : Installing package
21
+ run : |
22
+ pip3 install .
23
+ pip3 install .[pypi]
24
+ - name : Build Package
25
+ run : |
26
+ python -m build --no-isolation
27
+ - name : Publish package to PyPI
28
+ uses : pypa/gh-action-pypi-publish@release/v1
29
+ with :
30
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
31
+ repository_url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments