Distribute fessctl via PyPI (Trusted Publishing)#30
Merged
Conversation
b3129a6 to
7634a23
Compare
7634a23 to
f58ed2a
Compare
Replace the Homebrew formula pipeline with a PyPI release workflow. On a v* tag push, build the sdist+wheel with uv and publish via pypa/gh-action-pypi-publish using OIDC Trusted Publishing (no API token), gated on a pypi GitHub environment. Validate the tag matches the pyproject version before building.
f58ed2a to
86ae482
Compare
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
Distributes
fessctlvia PyPI instead of Homebrew. On everyv*tag push, a release workflow builds the sdist + wheel withuv buildand publishes them to PyPI using Trusted Publishing (OIDC) — no long-lived API token.fessctlis a pure-Python CLI, so PyPI (pip/pipx/uv tool) is the natural distribution channel. The OIDC Trusted Publishing flow mirrors howrecotemalready publishes under the CodeLibs PyPI account.What's in this branch
.github/workflows/publish.yml)v*(plus a guardedworkflow_dispatchthat requires av*tag ref).pyproject.tomlversion before building.buildjob:uv build→ uploadsdist/(sdist + wheel) as a workflow artifact.publish-pypijob: downloads the artifact and publishes viapypa/gh-action-pypi-publish@release/v1from apypiGitHub environment withid-token: write(OIDC) and Sigstore attestations.pip/pipx/uv tool) and updates the install-method count.0.2.0(the first PyPI release);uv.lockupdated to match.readme = "README.md",license = "Apache-2.0"(SPDX) andlicense-files = ["LICENSE"]so the PyPI page renders the README and shows the license; bumps the setuptools build floor to>=77.0.0(PEP 639). Without these, the published page had no description and no license.Operator setup (one-time, before tagging)
Trusted Publishing stores no secrets, but it must be registered once:
fessctl:codelibs, Repositoryfessctlpublish.ymlpypicodelibs/fessctlrepo settings, create a GitHub Environment namedpypi(optionally with required reviewers / tag protection).Test plan
uv buildproducesfessctl-0.2.0.tar.gz+fessctl-0.2.0-py3-none-any.whl.fessctl = fessctl.cli:mainconsole script (entry_points.txt).License-Expression: Apache-2.0,Description-Content-Type: text/markdownand the rendered README; LICENSE bundled underdist-info/licenses/(no setuptools deprecation warnings).uv lockupdates only the project version (0.2.0.dev0→0.2.0); no dependency drift.pytest tests/unit— 104 passed.pypiGitHub environment.v0.2.0and confirm the workflow publishes to PyPI.pip install fessctl && fessctl --helpon a clean machine.