Skip to content

fix: ensure wheel and source distributions are uploaded to GitHub releases#95

Closed
fgogolli wants to merge 11 commits intomainfrom
fix/semantic-release-wheel-uploads
Closed

fix: ensure wheel and source distributions are uploaded to GitHub releases#95
fgogolli wants to merge 11 commits intomainfrom
fix/semantic-release-wheel-uploads

Conversation

@fgogolli
Copy link
Copy Markdown
Contributor

@fgogolli fgogolli commented Jan 5, 2026

Description

Semantic-release creates GitHub releases but doesn't attach the built wheel and source distribution files. This change makes the dist_glob_patterns more specific to ensure proper asset uploads.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code cleanup or refactor
  • Dependencies update
  • CI/CD or build process changes

Related Issues

Fixes missing wheel and source distribution attachments in GitHub releases

How Has This Been Tested?

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Current semantic-release configuration creates releases but doesn't attach build artifacts. This change makes the glob patterns more specific to match actual build outputs.

Test Configuration

  • Python version: 3.11
  • OS: GitHub Actions Ubuntu
  • AWS region: N/A
  • Dependencies changed: None

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have updated the CHANGELOG.md file
  • I have updated the version number (if applicable)

Additional Notes

This change ensures semantic-release properly attaches built wheel (.whl) and source distribution (.tar.gz) files to GitHub releases.

Performance Impact

  • No significant performance impact
  • Performance improved
  • Performance degraded (explain why it's necessary)

Security Considerations

  • No security implications
  • Security improved
  • Potential security concerns (explain and justify)

Dependencies

No dependency changes

Deployment Notes

After merge, semantic-release should create GitHub releases with wheel and source distribution files attached.

fgogolli and others added 10 commits January 5, 2026 19:50
- Add [tool.semantic_release.publish] dist = false to prevent PyPI publishing
- Preserve upload_to_vcs_release = true for GitHub releases
- Maintain all branch configuration (main, release, feature)
- Keep commit parser options and changelog settings
- Fixes 401 Unauthorized errors from semantic-release trying to publish to PyPI without OIDC
…-publishing

fix: disable PyPI publishing in semantic-release configuration
- Add dist_glob_patterns to semantic-release configuration to upload dist/* and checksums.txt
- Add version_toml configuration to let semantic-release handle pyproject.toml updates
- Modify build script to generate SHA256 checksums for all distribution files
- Simplify build target to remove complex version logic - semantic-release handles versioning
- Keep valuable build functionality: cleanup, dependency management, checksum generation
- Enables users to download wheels directly from GitHub releases with integrity verification

Files attached to releases:
- *.whl (Python wheel)
- *.tar.gz (Source distribution)
- checksums.txt (SHA256 checksums for verification)
- Use 'make build' instead of 'python -m build' to get checksums and enhanced build features
- Enable PyPI publishing with 'dist = true'
- Add dist_glob_patterns to upload wheels and checksums to GitHub releases

Workflow: version → build → tag → GitHub release → attach files → PyPI publish
feat: add Python wheels and checksums to GitHub releases
Automatically generated by python-semantic-release
Automatically generated by python-semantic-release
- Add actions, issues, and metadata read permissions
- Fixes 401 Unauthorized error when creating GitHub releases
- Semantic-release needs these permissions to create releases and upload assets
- Add explicit ref checkout and force reset to workflow SHA
- This prevents GITHUB_TOKEN 401 errors when semantic-release tries to create releases for non-HEAD commits
- GITHUB_TOKEN can only create releases/tags for the current HEAD commit due to GitHub API limitations
- Based on GitHub community findings: https://github.com/orgs/community/discussions/121022
…eases

Make dist_glob_patterns more specific to match .whl and .tar.gz files.
This ensures built packages are properly attached to GitHub releases.
@fgogolli fgogolli force-pushed the fix/semantic-release-wheel-uploads branch from 88c0c00 to c9420ef Compare January 5, 2026 21:51
@fgogolli fgogolli closed this Jan 5, 2026
@fgogolli fgogolli deleted the fix/semantic-release-wheel-uploads branch January 5, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant