File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 11name : CI
2+
23on :
34 push :
45 branches : [master]
56 tags : ['v*']
67 pull_request :
78 branches : [master]
9+
810jobs :
911 test :
1012 runs-on : ubuntu-latest
@@ -44,15 +46,30 @@ jobs:
4446 @semantic-release/exec \
4547 @semantic-release/git \
4648 @semantic-release/github
49+
4750 - name : Semantic Release
4851 if : github.ref == 'refs/heads/master' && matrix.python-version == '3.8'
4952 env :
5053 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5154 GH_TOKEN : ${{ secrets.GH_TOKEN }}
5255 run : npx semantic-release
53- - name : Publish to PyPI
54- if : startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.8'
56+
57+ # Separate job for PyPI publishing
58+ publish :
59+ needs : test
60+ if : startsWith(github.ref, 'refs/tags/')
61+ runs-on : ubuntu-latest
62+ environment : ci
63+ steps :
64+ - uses : actions/checkout@v3
65+ - name : Set up Python
66+ uses : actions/setup-python@v4
67+ with :
68+ python-version : ' 3.8'
69+ - name : Install dependencies
5570 run : |
5671 pip install build twine
72+ - name : Build and publish
73+ run : |
5774 python -m build
58- python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}
75+ python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}
You can’t perform that action at this time.
0 commit comments