Skip to content

Commit

Permalink
only publish to testpypi under certain conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
berquist committed Feb 19, 2024
1 parent 989db6e commit 0e2c370
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

# yamllint disable-line rule:truthy
on: push
on:
push:
# Attempt to run on all pushes.
# branches:
# - main
# tags:
# - v*

# For now always take the "reduced" form of the version, even for those
# actions runs that do not push to a package index.
Expand Down Expand Up @@ -108,6 +114,9 @@ jobs:
- build
runs-on: ubuntu-latest

# publish on merge to default branch or any tag
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')

environment:
name: testpypi
url: https://test.pypi.org/p/pyresponse
Expand Down

0 comments on commit 0e2c370

Please sign in to comment.