Add GitHub Actions workflow to publish to PyPI#52
Merged
Conversation
- Create .github/workflows/publish.yml with build and publish jobs triggered on GitHub release events - Use PyPI trusted publishing (OIDC) for secure token-free publishing - Add version validation step to ensure tag matches pyproject.toml - Add twine check step to verify distributions before publishing - Update pyproject.toml with authors, classifiers, and project URLs - Add Releasing section to CONTRIBUTING.md documenting the release process Closes #51
Contributor
There was a problem hiding this comment.
Pull request overview
Adds release automation and packaging metadata so regshape can be built and published to PyPI from GitHub Releases using trusted publishing (OIDC).
Changes:
- Introduces a GitHub Actions workflow to build sdist/wheel, validate tag vs
pyproject.tomlversion, and publish to PyPI. - Expands
pyproject.tomlPyPI metadata (authors, classifiers, project URLs). - Documents the release/tagging process and trusted publishing setup in
CONTRIBUTING.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/publish.yml |
Adds CI jobs to build artifacts and publish to PyPI from GitHub Release events. |
pyproject.toml |
Adds PyPI metadata fields (authors, classifiers, URLs). |
CONTRIBUTING.md |
Documents release steps and one-time trusted publishing setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add the minimal required permissions for downloading artifacts (and keep id-token: write for trusted publishing). Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Toddy Mladenov <me@toddysm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a GitHub Actions workflow that builds, packages, and publishes the
regshapePython package to PyPI on tagged releases.Changes
.github/workflows/publish.yml(new)pyproject.toml, builds sdist and wheel, verifies withtwine check, uploads artifactspyproject.tomlauthorsfieldclassifiers(Development Status, License, Python versions, OS, Topic)[project.urls](Homepage, Repository, Bug Tracker)CONTRIBUTING.mdvX.Y.Z)Manual Setup Required
toddysm, repo=regshape, workflow=publish.yml, environment=pypi)pypienvironment in GitHub repo Settings → EnvironmentsCloses #50
Closes #51