Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ name: Release
#
# Triggers:
# * Pushing a version tag (v*) -> builds and uploads to PyPI.
# * Publishing a GitHub Release -> builds and uploads to PyPI.
# (Publishing a GitHub Release that creates a new tag fires this same
# event, so the Release UI flow works too — as a single run.)
# * Manual "Run workflow" -> builds and uploads to TestPyPI (staging).
#
# To cut a release: `git tag v1.2.3 && git push origin v1.2.3`
Expand All @@ -25,8 +26,6 @@ on:
push:
tags:
- 'v*'
release:
types: [published]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -73,11 +72,13 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true

publish-pypi:
name: Publish to PyPI
# A pushed version tag or a published GitHub Release uploads to production PyPI.
if: github.event_name == 'push' || github.event_name == 'release'
# A pushed version tag (incl. tags created by publishing a GitHub Release)
# uploads to production PyPI.
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
environment:
Expand All @@ -93,3 +94,5 @@ jobs:
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
Loading