Skip to content

ci: add PyPI publish workflow - #15

Merged
deviantintegral merged 4 commits into
mainfrom
copilot/add-publish-to-testpypi-workflow
Feb 26, 2026
Merged

deviantintegral merged 4 commits into
mainfrom
copilot/add-publish-to-testpypi-workflow

Conversation

Copilot AI commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor

Adds a GitHub Actions workflow to build and publish the package following the PyPA CI/CD publishing guide.

Changes

  • New workflow .github/workflows/publish-to-pypi.yml:
    • build job: uses uv build to produce distributions, uploads as artifacts; scoped to contents: read only
    • publish-to-testpypi job: triggered on every push to main; downloads artifacts and publishes to https://test.pypi.org/legacy/ via pypa/gh-action-pypi-publish using the testpypi environment
    • publish-to-pypi job: triggered on GitHub release publication; publishes to production PyPI via pypa/gh-action-pypi-publish using the pypi environment
    • OIDC trusted publishing for both jobs (id-token: write); no API tokens required
    • All actions pinned to SHA digests, consistent with existing workflows and the Renovate helpers:pinGitHubActionDigests preset

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…mit to main

Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow for publishing to TestPyPI Add TestPyPI publish workflow on every push to main Feb 26, 2026
@deviantintegral

Copy link
Copy Markdown
Owner

@copilot add the job based on the linked pypi docs to also push releases to the production pypi instance.

Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com>

Copilot AI commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

@copilot add the job based on the linked pypi docs to also push releases to the production pypi instance.

Added in 26e4625. The workflow now also triggers on release: types: [published] and runs a publish-to-pypi job (using the pypi environment with OIDC) that publishes to production PyPI when a GitHub release is published. The publish-to-testpypi job is gated to push events only.

Copilot AI changed the title Add TestPyPI publish workflow on every push to main Add PyPI publish workflow: TestPyPI on every push to main, production PyPI on release Feb 26, 2026
@deviantintegral deviantintegral changed the title Add PyPI publish workflow: TestPyPI on every push to main, production PyPI on release Ci: add PyPI publish workflow Feb 26, 2026
@deviantintegral deviantintegral changed the title Ci: add PyPI publish workflow ci: add PyPI publish workflow Feb 26, 2026
@deviantintegral
deviantintegral marked this pull request as ready for review February 26, 2026 00:37
@deviantintegral
deviantintegral enabled auto-merge (squash) February 26, 2026 00:38
@deviantintegral
deviantintegral merged commit fb70768 into main Feb 26, 2026
3 of 4 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.

2 participants