Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
update publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Friedowitz committed Feb 22, 2024
1 parent 27878d5 commit 4960d78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish to PyPI

on:
workflow_dispatch:
release:
types: [created,released]
types: [released]

jobs:
publish:
Expand All @@ -24,7 +25,7 @@ jobs:

- name: Publish to TestPyPI
uses: pypa/[email protected]
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/
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 4960d78

Please sign in to comment.