Skip to content

Commit 9059f28

Browse files
optimize workflow
1 parent 8a63779 commit 9059f28

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/publish.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Python distribution to PyPI and TestPyPI
1+
name: Publish package
22

33
on: push
44

@@ -24,7 +24,7 @@ jobs:
2424
path: dist/
2525

2626
publish-to-pypi:
27-
name: Publish Python distribution to PyPI
27+
name: Publish to PyPI
2828
if: startsWith(github.ref, 'refs/tags/')
2929
needs:
3030
- build
@@ -45,7 +45,7 @@ jobs:
4545
uses: pypa/gh-action-pypi-publish@release/v1
4646

4747
github-release:
48-
name: Upload the Python distribution to GitHub Release
48+
name: Create GitHub Release
4949
needs:
5050
- publish-to-pypi
5151
runs-on: ubuntu-latest
@@ -83,7 +83,8 @@ jobs:
8383
--repo '${{ github.repository }}'
8484
8585
publish-to-testpypi:
86-
name: Publish Python distribution to TestPyPI
86+
name: Publish to TestPyPI
87+
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
8788
needs:
8889
- build
8990
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)