Skip to content

Commit 5d752e9

Browse files
authored
👷 Upload to TestPyPI on prerelease and release tags (#40)
Just upload to TestPyPI on any tag, but prevent upload to PyPI on pre-releases.
1 parent 81fea3c commit 5d752e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ jobs:
237237

238238
publish-to-testpypi:
239239
name: Publish Python 🐍 distribution 📦 to TestPyPI
240-
if: ${{ github.event_name == 'release' && github.event.action == 'prereleased' }}
240+
if: startsWith(github.ref, 'refs/tags/')
241241
needs: [linux, windows, macos, sdist]
242242
runs-on: ubuntu-24.04
243243
environment:
@@ -264,7 +264,7 @@ jobs:
264264
environment:
265265
name: pypi
266266
url: https://pypi.org/project/cog3pio/
267-
if: ${{ github.event_name == 'release' && github.event.action == 'released' }}
267+
if: github.event.release.prerelease == false && startsWith(github.ref, 'refs/tags/')
268268
needs: [linux, windows, macos, sdist]
269269
permissions:
270270
id-token: write # IMPORTANT: mandatory for trusted OIDC publishing

0 commit comments

Comments
 (0)