File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ name: Python Package
33on :
44 push :
55 branches : [master]
6+ tags :
7+ - v*
68 pull_request :
79 branches : [master]
810
2931
3032 - name : Upload coverage to Codecov
3133 uses : codecov/codecov-action@v3
34+
35+ publish :
36+ runs-on : ubuntu-latest
37+ needs : test # 声明依赖于先前的测试作业
38+ if : startsWith(github.ref, 'refs/tags/') # 仅在标签推送时运行
39+ steps :
40+ - uses : actions/checkout@v3
41+
42+ - name : Set up Python
43+ uses : actions/setup-python@v4
44+ with :
45+ python-version : 3.9
46+
47+ - name : Install dependencies
48+ run : |
49+ python -m pip install --upgrade pip
50+ pip install poetry
51+
52+ - name : Publish package to PyPI
53+ run : |
54+ poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
55+ poetry publish --build --skip-existing
You can’t perform that action at this time.
0 commit comments