Skip to content

Commit

Permalink
Update publish-release-to-pypi.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
menckend authored Oct 23, 2024
1 parent cc0f84b commit 261ca89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish-release-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name: Publish Release package to Pypi.org
on:
release:
types: [published]
branches: main


jobs:
build:
if: ${{ startsWith(github.ref, 'refs/tags/') }} # only publish to test.pypi.org on tagged commits from test branch
environment:
name: pypi
url: https://pypi.org/p/dcnodatg # Replace <package-name> with your PyPI project name
Expand All @@ -31,6 +34,7 @@ jobs:
name: python-package-distributions
path: dist/
publish-to-pypi:
if: ${{ startsWith(github.ref, 'refs/tags/') }} # only publish to test.pypi.org on tagged commits from test branch
name: >-
Publish Python distribution to PyPI
needs:
Expand All @@ -50,7 +54,7 @@ jobs:
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
if: startsWith(github.ref, 'nevermatch')
if: ${{ startsWith(github.ref, 'refs/tags/') }} # only publish to test.pypi.org on tagged commits from test branch
environment:
name: pypi
url: https://pypi.org/p/dcnodatg # Replace <package-name> with your PyPI project name
Expand Down

0 comments on commit 261ca89

Please sign in to comment.