Skip to content

ci(deploy): ✨ publish to PyPI via trusted publishing - #61

Merged
Panadestein merged 2 commits into
mainfrom
feat/publish-pypi
Oct 13, 2026
Merged

Panadestein merged 2 commits into
mainfrom
feat/publish-pypi

Conversation

@Panadestein

@Panadestein Panadestein commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Publishes src_method to the real, public PyPI, through PyPI's trusted publishing (OIDC): no API token is generated or stored anywhere. This replaces the AWS CodeArtifact upload, which is dropped along with its force-upload input.

What this adds

  • upload_pypi: runs when a GitHub release is published, uploads the already-built sdist and wheel to pypi.org.

Reuses the existing build-sdist-wheel job; nothing about the build changes.

Setup needed before this can publish (not part of this PR)

  1. A PyPI account, with its own email, 2FA turned on (PyPI requires it).
  2. The project on PyPI. Either create src_method there first, or use PyPI's "pending publisher" feature to register the trusted publisher before the project exists; the first successful publish then creates it.
  3. A trusted publisher on PyPI, under the project's (or pending publisher's) settings: owner Algorithmiq, repository src-method, workflow file deploy.yml, environment pypi.
  4. A pypi GitHub environment (repo Settings > Environments), ideally with required reviewers, since publishing a version to PyPI cannot be undone (only yanked).

Until that setup exists, the job will fail (no matching trusted publisher), but nothing else in this PR depends on it.

…tifact

Adds `upload_pypi` (on a published release) and `upload_testpypi` (manual dry
run) jobs using PyPI's trusted publishing (OIDC): no API token is stored in
the repository. Removes the AWS CodeArtifact upload and its `force-upload`
input; we no longer deploy there.

Each job needs a GitHub environment with a matching trusted publisher
configured on (test.)pypi.org; `pypi` should also require a reviewer, since a
release there cannot be undone.

Assisted-by: GitHub Copilot:Claude Opus 5.5
One less environment to configure; publishing straight to PyPI on release.

Assisted-by: GitHub Copilot:Claude Opus 5.5
@Panadestein
Panadestein marked this pull request as ready for review October 13, 2026 08:52
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  5 files  ±0    5 suites  ±0   2m 55s ⏱️ -4s
206 tests ±0  205 ✅ ±0  1 💤 ±0  0 ❌ ±0 
986 runs  ±0  983 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit cbc671c. ± Comparison against base commit 698169a.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The workflow correctly configures release-only PyPI trusted publishing without stored credentials.

0 open findings

What changed in this PR

Replaces AWS CodeArtifact deployment with PyPI trusted publishing via OIDC.

Changes:

  • Removes manual forced uploads and AWS authentication.
  • Adds a protected pypi environment and trusted publishing action.
  • Reuses the existing release artifact build.
File Description
.github/​workflows/​deploy.yml Publishes release artifacts directly to PyPI using OIDC.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Panadestein
Panadestein merged commit 3284f76 into main Oct 13, 2026
23 of 26 checks passed
@Panadestein
Panadestein deleted the feat/publish-pypi branch October 13, 2026 12:28
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