File tree Expand file tree Collapse file tree 1 file changed +12
-24
lines changed Expand file tree Collapse file tree 1 file changed +12
-24
lines changed Original file line number Diff line number Diff line change 7
7
8
8
jobs :
9
9
10
- build :
10
+ build-then-publish :
11
11
runs-on : ubuntu-latest
12
12
strategy :
13
13
matrix :
@@ -25,32 +25,20 @@ jobs:
25
25
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26
26
- name : Package
27
27
run : |
28
+ python setup.py build
28
29
python setup.py sdist
29
30
python setup.py bdist_wheel
30
-
31
-
32
- test-deploy :
33
- if : github.ref_type == 'tag' && contains(github.ref_name, 'test')
34
- needs : build
35
- environment :
36
- name : test-pypi
37
- runs-on : ubuntu-latest
38
- steps :
39
- - name : Publish 📦 to Test PyPI
40
- uses : pypa/gh-action-pypi-publish@master
31
+ - name : Publish distribution 📦 to Test PyPI
32
+ if : github.ref_type == 'tag' && contains(github.ref_name, 'test')
33
+ uses : pypa/gh-action-pypi-publish@release/v1 # license BSD-2
41
34
with :
42
- password : ${{ secrets.TEST_PYPI_TOKEN }}
35
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
43
36
repository_url : https://test.pypi.org/legacy/
44
-
45
-
46
- production-deploy :
47
- needs : build
48
- environment :
49
- name : pypi
50
- runs-on : ubuntu-latest
51
- steps :
52
- - name : Publish 📦 to Real PyPI
53
- uses : pypa/gh-action-pypi-publish@master
37
+ - name : Publish distribution 📦 to PyPI
38
+ if : ${{ github.ref == 'refs/heads/master' && inputs.is_draft }}
39
+ - uses : pypa/gh-action-pypi-publish@release/v1 # license BSD-2
54
40
with :
55
41
password : ${{ secrets.PYPI_API_TOKEN }}
56
- repository_url : https://pypi.org/legacy/
42
+
43
+
44
+
You can’t perform that action at this time.
0 commit comments