-
Notifications
You must be signed in to change notification settings - Fork 5
fix: Rework release publishing #317
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
Reviewer's GuideThe workflow adjustment in semantic-release.yml reorders the publish sequence to first publish to GitHub Releases, then removes the provenance file from dist, and finally pushes the package to PyPI, ensuring the provenance artifact isn’t included in the PyPI distribution. Flow diagram for new release publishing orderflowchart TD
Start([Start]) --> Build[Build dist/ with provenance]
Build --> GHRelease[Publish to GitHub Releases]
GHRelease --> RemoveProvenance[Remove provenance file from dist/]
RemoveProvenance --> PyPI[Publish to PyPI]
PyPI --> End([End])
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @jmgate - I've reviewed your changes - here's some feedback:
- Use
rm -f
or add a check to avoid failing the workflow if the provenance file isn’t present when you try to remove it. - Consider adding a brief inline comment explaining why you’re reordering the publish steps and removing the provenance before PyPI upload.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Use `rm -f` or add a check to avoid failing the workflow if the provenance file isn’t present when you try to remove it.
- Consider adding a brief inline comment explaining why you’re reordering the publish steps and removing the provenance before PyPI upload.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
=======================================
Coverage 93.97% 93.97%
=======================================
Files 2 2
Lines 166 166
Branches 37 37
=======================================
Hits 156 156
Misses 4 4
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The PyPI upload failed with: Checking dist/reverse_argparse-2.0.8-py3-none-any.whl: PASSED Checking dist/multiple.intoto.jsonl: ERROR InvalidDistribution: Unknown distribution format: 'multiple.intoto.jsonl' I suppose the provenance can't be included in the `dist` directory for the PyPI upload, but it needs to be in there for python-semantic-release publish to GitHub Releases action. This commit reorders things, such that we publish to GitHub first, and save PyPI for last, and between the two we remove the provenance from the `dist` directory. Hopefully this works.
Type: Bug
Description
The PyPI upload failed with:
I suppose the provenance can't be included in the
dist
directory for the PyPI upload, but it needs to be in there for python-semantic-release publish to GitHub Releases action. This commit reorders things, such that we publish to GitHub first, and save PyPI for last, and between the two we remove the provenance from thedist
directory. Hopefully this works.Related Issues/PRs
Problems created in #315 and #316.
Summary by Sourcery
Reorder the GitHub Actions release workflow to publish to GitHub Releases first, remove the provenance file from the distribution, and then publish to PyPI to prevent invalid distribution errors
Bug Fixes:
CI: