File tree Expand file tree Collapse file tree 5 files changed +20
-28
lines changed
Expand file tree Collapse file tree 5 files changed +20
-28
lines changed Original file line number Diff line number Diff line change 22
33on :
44 push :
5- branches : [ master, main ]
5+ branches : [ main ]
66 pull_request :
7- branches : [ master, main ]
7+ branches : [ main ]
88
99jobs :
1010 test :
Original file line number Diff line number Diff line change 1- name : Release
1+ name : Test Package
22
33on :
44 push :
5- tags :
6- - ' v*'
7- - ' [0-9]+.[0-9]+.[0-9]+'
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
89
910jobs :
1011 test :
3435 - name : Check package
3536 run : |
3637 twine check dist/*
37-
38- - name : Publish to Test PyPI
39- env :
40- TWINE_USERNAME : __token__
41- TWINE_PASSWORD : ${{ secrets.TEST_PYPI_API_TOKEN }}
42- run : |
43- twine upload --repository testpypi dist/*
44- if : env.TWINE_PASSWORD != ''
45- continue-on-error : true
46-
47- - name : Publish to PyPI
48- env :
49- TWINE_USERNAME : __token__
50- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
51- run : |
52- twine upload dist/*
53- if : env.TWINE_PASSWORD != '' && startsWith(github.ref, 'refs/tags/')
38+
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: Test Matrix
22
33on :
44 push :
5- branches : [ master, main ]
5+ branches : [ main ]
66 pull_request :
7- branches : [ master, main ]
7+ branches : [ main ]
88
99jobs :
1010 test-matrix :
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: Tests
22
33on :
44 push :
5- branches : [ master, main ]
5+ branches : [ main ]
66 pull_request :
7- branches : [ master, main ]
7+ branches : [ main ]
88
99jobs :
1010 lint :
Original file line number Diff line number Diff line change 11all : build upload
22
33build :
4+ pip install build twine
45 python -m build
6+ twine check dist/*
57
6- upload :
8+ upload-prod : build
9+ export TWINE_USERNAME=__token__
710 python -m twine upload dist/*
811
12+ upload-test : build
13+ export TWINE_USERNAME=__token__
14+ python -m twine --repository testpypi upload dist/*
15+
916clean :
1017 rm -rf build/ dist/ * .egg-info/ __pycache__/ .pytest_cache/ .mypy_cache/
1118 find . -type f -name " *.pyc" -delete
You can’t perform that action at this time.
0 commit comments