File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 1212 branches : [ master ]
1313
1414jobs :
15- build :
16-
15+ test :
1716 runs-on : ubuntu-latest
1817 strategy :
1918 matrix :
2524 uses : actions/setup-python@v4
2625 with :
2726 python-version : ${{ matrix.python-version }}
28- - name : Debug Event Info
29- run : |
30- echo "Event name: ${{ github.event_name }}"
31- echo "Ref: ${{ github.ref }}"
32- echo "Is tag? ${{ startsWith(github.ref, 'refs/tags/') }}"
3327 - name : Install dependencies
3428 run : |
3529 python -m pip install --upgrade pip
@@ -45,14 +39,24 @@ jobs:
4539 - name : Test with pytest
4640 run : |
4741 pytest
42+
43+ publish :
44+ needs : test
45+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
46+ runs-on : ubuntu-latest
47+
48+ steps :
49+ - uses : actions/checkout@v3
50+ - name : Set up Python 3.12
51+ uses : actions/setup-python@v4
52+ with :
53+ python-version : 3.12
4854 - name : Build and publish
49- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
5055 env :
5156 TWINE_USERNAME : __token__
5257 TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
5358 run : |
54- pip install twine wheel
59+ pip install setuptools twine wheel
5560 pip wheel -w dist --no-deps .
5661 python setup.py sdist
5762 twine upload dist/*
58- continue-on-error : true
You can’t perform that action at this time.
0 commit comments