From 4960d78c9ba0bb4d3d3369286660d3cf954ed286 Mon Sep 17 00:00:00 2001 From: Sean Friedowitz Date: Thu, 22 Feb 2024 10:43:39 -0700 Subject: [PATCH] update publish --- .github/workflows/publish.yaml | 5 +++-- CONTRIBUTING.md | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4bf729d5..de313209 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,8 +1,9 @@ name: Publish to PyPI on: + workflow_dispatch: release: - types: [created,released] + types: [released] jobs: publish: @@ -24,7 +25,7 @@ jobs: - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@v1.8.11 - if: github.event_name == 'release' && github.event.action == 'created' + if: github.event_name == 'workflow_dispatch' with: password: ${{ secrets.PYPI_TEST_KEY }} repository-url: https://test.pypi.org/legacy/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 756d52be..b5b20e24 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,9 +76,9 @@ see the `examples/dev_submission` directory. `.github/workflows/publish.yaml` contains the GitHub Action used to publish wheels to PyPI. -This workflow is triggered by the creation of GitHub Releases. -Draft releases trigger publishing to TestPyPI, -while full releases trigger the prod version. +The publishing workflow can be triggered in two ways: +1. Manually triggered on the GitHub Actions UI, which publishes the package to TestPyPI, or +2. Triggered by the creation of a GitHub release, which publishes to real PyPI. When creating a GitHub release, make sure that the tag used for the release matches the version of the target code branch.