Skip to content

ci: merge PyPI publish workflows, switch to trusted publishing - #114

Merged
hewliyang merged 1 commit into
hly/chore/spec-syncfrom
hly/ci/trusted-publishing
Sep 8, 2026
Merged

hewliyang merged 1 commit into
hly/chore/spec-syncfrom
hly/ci/trusted-publishing

Conversation

@hewliyang

@hewliyang hewliyang commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Stacked on #113.

What

  • Merge publish-shim-pypi.yml into publish-pypi.yml as a second job with needs: publish.
  • Switch both jobs to PyPI trusted publishing (OIDC) via uv publish --trusted-publishing always. No token secret.
  • Both jobs use environment: pypi and permissions: id-token: write. Top level is contents: read.
  • Shim job uses uv build + uvx twine check --strict instead of pip install build twine.
  • Remove bin/publish-pypi and its pyproject.toml references (sdist include, ruff ignore).
  • Update CONTRIBUTING.

Why one workflow

workflow_run always runs the workflow file from the default branch and checks out the default branch. It also does not fire when the parent is run via workflow_dispatch on a non-default branch. A needs: job runs on the same ref as the release tag and shows up in the same run.

Setup before the next release

  1. PyPI reductoai → Manage → Publishing → add GitHub publisher: owner reductoai, repo reducto-python-sdk, workflow publish-pypi.yml, environment pypi.
  2. Same for PyPI reducto.
  3. Create the pypi environment in GitHub repo settings.
  4. After the first successful run, delete REDUCTO_PYPI_TOKEN / PYPI_TOKEN secrets.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Fold the reducto alias shim job into publish-pypi.yml as a dependent job
so it runs on the release ref instead of the default branch via
workflow_run. Both jobs now publish with uv via PyPI OIDC trusted
publishing; no API token secret is needed.

Drop bin/publish-pypi and its pyproject references. Update CONTRIBUTING.
@hewliyang
hewliyang requested a review from kirthi20 September 8, 2026 21:38
@hewliyang
hewliyang merged commit 348b961 into main Sep 8, 2026
7 checks passed
@hewliyang hewliyang mentioned this pull request Sep 8, 2026
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