Skip to content

Add GitHub Actions workflow to publish to PyPI#52

Merged
toddysm merged 3 commits intomainfrom
feature/pypi-publish
Mar 16, 2026
Merged

Add GitHub Actions workflow to publish to PyPI#52
toddysm merged 3 commits intomainfrom
feature/pypi-publish

Conversation

@toddysm
Copy link
Owner

@toddysm toddysm commented Mar 16, 2026

Summary

Implements a GitHub Actions workflow that builds, packages, and publishes the regshape Python package to PyPI on tagged releases.

Changes

.github/workflows/publish.yml (new)

  • Build job: checks out code, sets up Python 3.10+, validates tag version matches pyproject.toml, builds sdist and wheel, verifies with twine check, uploads artifacts
  • Publish job: downloads build artifacts and publishes to PyPI using trusted publishing (OIDC) — no API token secrets needed

pyproject.toml

  • Added authors field
  • Added classifiers (Development Status, License, Python versions, OS, Topic)
  • Added [project.urls] (Homepage, Repository, Bug Tracker)

CONTRIBUTING.md

  • Added "Releasing" section documenting:
    • Tag naming convention (vX.Y.Z)
    • Step-by-step release process
    • What the workflow does
    • How to verify the published package
    • One-time trusted publishing setup instructions

Manual Setup Required

  • Configure trusted publishing on PyPI (pending publisher: owner=toddysm, repo=regshape, workflow=publish.yml, environment=pypi)
  • Create a pypi environment in GitHub repo Settings → Environments

Closes #50
Closes #51

- 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
Copilot AI review requested due to automatic review settings March 16, 2026 02:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.toml version, and publish to PyPI.
  • Expands pyproject.toml PyPI 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.

toddysm and others added 2 commits March 15, 2026 20:03
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>
@toddysm toddysm merged commit 7ad88ba into main Mar 16, 2026
3 checks passed
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.

Implement GitHub Action to package and publish regshape to PyPI Implement GitHub Action to package and publish regshape to PyPI

2 participants