-
Notifications
You must be signed in to change notification settings - Fork 6
Workflow for publishing to TestPyPI #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow for publishing to TestPyPI #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a reusable workflow pattern for publishing Python packages to PyPI/TestPyPI. It adds two new workflow files: a reusable workflow that handles the entire publish process (building, signing, uploading to PyPI, and creating GitHub releases), and a caller workflow configured for TestPyPI.
- Adds a reusable workflow (
publish-reusable.yml) that builds Python packages, publishes to PyPI/TestPyPI, signs with sigstore, and creates GitHub releases - Adds a caller workflow (
publish-to-testpypi.yaml) that triggers the reusable workflow for TestPyPI deployments - Implements trusted publishing with OIDC for secure PyPI authentication
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/publish-to-testpypi.yaml |
Caller workflow that invokes the reusable workflow for TestPyPI publishing with manual trigger |
.github/workflows/publish-reusable.yml |
Reusable workflow that handles building, publishing, signing, and release creation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
336ee26 to
3bcd8aa
Compare
3bcd8aa to
5d5e977
Compare
| uses: .github/workflows/publish-reusable.yml@main | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| release_notes: ${{ github.head_ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because this whole workflow is just for testing. It pushes to TestPyPI, so my intention is that we can do it whenever we feel like it, rather than just when we have a new release.
I'm planning to add a separate workflow for pushing to PyPI, which is why I've put most of the logic in a reusable workflow.
https://test.pypi.org/ is a testing version of https://pypi.org. I'll try to get this workflow working there first before I try to add the real PyPI. I've implemented it with a reusable workflow, so hopefully it will be easy to add PyPI when I've got this working.