Skip to content

Lint/build CI + GitHub Release → PyPI publish workflow - #3

Merged
bluesentinelsec merged 1 commit into
mainfrom
feature/lint-and-pypi-publish
Jul 27, 2026
Merged

Lint/build CI + GitHub Release → PyPI publish workflow#3
bluesentinelsec merged 1 commit into
mainfrom
feature/lint-and-pypi-publish

Conversation

@bluesentinelsec

Copy link
Copy Markdown
Owner

Summary

Third polishing slice (after #1 opt-outs/tests, #2 package split):

  • Version: src/cppboot/_version.py is the single source (setuptools dynamic version)
  • Quality: ruff check/format + mypy (strict) in CI; fixed lint/type issues
  • Build: CI builds sdist/wheel and runs twine check
  • Publish (.github/workflows/publish.yml):
    • Triggers on GitHub Release published (tag vX.Y.Z must match package version)
    • Builds distributions, then uploads to PyPI via Trusted Publishing (OIDC)
    • Manual workflow_dispatch defaults to TestPyPI
    • Does not publish anything until you create a release / run the workflow

Release flow (when you are ready later)

  1. Bump _version.py + CHANGELOG → merge to main
  2. gh release create v0.1.0 (or UI)
  3. Publish workflow verifies tag == version → builds → PyPI

One-time: configure PyPI Trusted Publisher + GitHub Environments pypi / testpypi (documented in README).

Test plan

  • pytest 56 passed
  • ruff check / ruff format --check clean
  • mypy clean
  • python -m build && twine check dist/* passed
  • CI green on this PR (lint + build + matrix tests)
  • Do not create a GitHub Release or run publish against real PyPI yet

Single-source version in _version.py. CI runs ruff, mypy, pytest, and
twine-checked sdist/wheel builds. Publish workflow wires GitHub Releases
to PyPI Trusted Publishing (OIDC) and TestPyPI via dispatch, without
publishing until a release is intentionally created.
@bluesentinelsec
bluesentinelsec merged commit 82d73e7 into main Jul 27, 2026
8 checks passed
@bluesentinelsec
bluesentinelsec deleted the feature/lint-and-pypi-publish branch July 27, 2026 16:32
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