Skip to content

Add PyPI publish workflow via trusted publishing - #87

Open
mmlado wants to merge 1 commit into
mainfrom
chore/pypi-publish-workflow
Open

mmlado wants to merge 1 commit into
mainfrom
chore/pypi-publish-workflow

Conversation

@mmlado

@mmlado mmlado commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Adds .github/workflows/publish.yml: a push of a tag matching ver* builds the sdist and wheel and uploads them to PyPI with Trusted Publishing, the same flow cryptnox-id-cli uses.

Before anything is uploaded the workflow checks that

  • the tagged commit is on main
  • the tag equals ver + cryptnox_cli.__version__

The upload runs in the repository's pypi environment, which only deployments from ver* tags may use. Actions are pinned to commit SHAs; Dependabot keeps them current.

Requires on PyPI, by a project owner: a trusted publisher on cryptnox-cli with owner Cryptnox, repository cryptnox-cli, workflow publish.yml, environment pypi. Until it exists a tag push fails at the publish step and nothing is uploaded.

Checked locally: python -m build produces cryptnox_cli-1.0.5.tar.gz and cryptnox_cli-1.0.5-py3-none-any.whl; the changelog parses.

🤖 Generated with Claude Code

A push of a tag matching ver* builds the sdist and wheel and uploads
them to PyPI from the pypi environment. Before the upload the workflow
checks that the tagged commit is on main and that the tag equals ver
plus cryptnox_cli.__version__.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mmlado
mmlado requested a review from YanNaingWinn October 30, 2026 14:07
@mmlado mmlado self-assigned this Oct 30, 2026

This branch has not been deployed

No deployments
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.

1 participant