Skip to content

Commit d372017

Browse files
authored
Merge pull request #113 from lhh/fix_publish_test
github: Don't publish to pypi on misc. pushes, only test after merge …
2 parents bbaec74 + 748dfaf commit d372017

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
publish-to-pypi:
3333
name: >-
34-
Publish to PyPI
34+
Publish new release to PyPI
3535
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3636
needs:
3737
- build
@@ -64,7 +64,7 @@ jobs:
6464
id-token: write # IMPORTANT: mandatory for sigstore
6565

6666
steps:
67-
- name: Download all the dists
67+
- name: Download artifacts
6868
uses: actions/download-artifact@v4
6969
with:
7070
name: python-package-distributions
@@ -95,9 +95,10 @@ jobs:
9595
--repo "$GITHUB_REPOSITORY"
9696
9797
publish-to-testpypi:
98-
name: Publish Python distribution to TestPyPI
98+
name: Publish test build to TestPyPI
9999
needs:
100100
- build
101+
if: github.ref == 'refs/heads/main' # only publish to TestPyPI on merge to main
101102
runs-on: ubuntu-latest
102103

103104
environment:

0 commit comments

Comments
 (0)