-
Notifications
You must be signed in to change notification settings - Fork 28
Update PyPI publish workflow for prereleases #494
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
Conversation
Workflow now triggers on published and prereleased events, sets PEP 440-compliant version for prereleases, and adds 'skip-existing' to PyPI publish step. Improves handling of pre-release publishing and artifact management.
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 updates the PyPI publish workflow to properly handle pre-releases by triggering on both published and prereleased events, implementing PEP 440-compliant versioning for development snapshots, and adding skip-existing functionality for artifact publishing.
- Expands workflow trigger from only published releases to include prereleases
- Implements automatic PEP 440-compliant versioning for prereleases using date, run number, and git SHA
- Adds skip-existing option to prevent PyPI publish failures on duplicate uploads
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/pypi-publish.yaml | Updates workflow triggers, adds prerelease versioning logic, and improves PyPI publish configuration |
| CHANGELOG.md | Documents the new pre-release functionality for development snapshots |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
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
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Eliminates the step that sets a PEP 440-compliant pre-release version in the PyPI publish workflow. This simplifies the workflow and relies on the tags provided by the github release.
…ons/SSSOM into add-pypi-prerelease
Renamed the build step in the PyPI publish workflow for clarity, changing 'Build sdist & wheel' to 'Build source and wheel archives'.
Removed an unnecessary blank line and reset the comment for the id-token permission in the PyPI publish GitHub Actions workflow.
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.
Looks good to me.
You might want to add some notes somewhere that it is the responsibility of whoever wants to do a ”pre-release” to remember to create the release tag accordingly (i.e. a release tag that includes a aN, bN, .devN suffix, depending on the desired type of pre-release).
Workflow now triggers on published and prereleased events, sets PEP 440-compliant version for prereleases, and adds 'skip-existing' to PyPI publish step. Improves handling of pre-release publishing and artifact management.
Resolves #490
docs/have been added/updated if necessarymake testhas been run locally