Releases are tag-driven. Pushing a v* tag runs
.github/workflows/release.yml, which builds
the distribution, publishes it to PyPI, and creates a GitHub Release. There is no
auto-bump on every push — cutting a release is a deliberate action.
The publish job uses PyPI Trusted Publishing (OIDC) rather than a stored API token, so no PyPI secret is kept in the repo.
- On PyPI, add a Trusted Publisher for the
metasploit-mcpproject:- Owner / repository:
setuidloot/MetasploitMCP - Workflow filename:
release.yml - Environment name:
pypi
- Owner / repository:
- In the GitHub repo settings, create an Environment named
pypi(this matchesenvironment: name: pypiin the workflow).
-
Update
CHANGELOG.mdwith the new version and its changes. -
Bump the version so
pyproject.tomlandserver.jsonagree on the target:poetry version <major|minor|patch> # or an explicit version, e.g. 3.0.1
Update the
versionfields inserver.json(both the top-level and the package entry) to match. -
Regenerate the SBOM so its root version matches the release, then commit it:
make sbom # regenerates sbom.json from poetry.lock + pyproject.toml make sbom-check # verifies sbom.json is in sync (CI and the release run this)
CI and the release build both fail if
sbom.jsonis stale, so this must be committed alongside the version bump. -
Commit the version bump (and regenerated
sbom.json) and merge it tomain. -
Tag the release commit and push the tag. The tag must match the
pyproject.tomlversion (the workflow verifies this and fails otherwise):git tag v3.0.1 git push origin v3.0.1
- build — installs Poetry, verifies the tag matches
pyproject.toml, verifiessbom.jsonis in sync withpoetry.lock(--check), runspoetry build, and validates metadata withtwine check. The SBOM is uploaded as a separatesbomartifact (kept out ofdist/so the PyPI publish step never sees a non-package file). - pypi-publish — publishes the built sdist and wheel to PyPI via the
pypienvironment using Trusted Publishing (OIDC). - github-release — creates a GitHub Release for the tag with
auto-generated notes and attaches the built sdist, wheel, and
sbom.json.
.github/workflows/ci.yml runs, in addition to
the test matrix:
- quality —
black --check(blocking) andmypy(advisory for now; a pre-existing type backlog is being burned down before it becomes blocking). - sbom freshness —
scripts/generate_sbom.py --check; fails ifsbom.jsonis out of date. Fix withmake sbomand commit the result. - build distribution —
poetry build+twine checkso packaging errors are caught before a release tag is cut.
pip install metasploit-mcp==<version>
metasploit-mcp --helpThe published GitHub Release also carries sbom.json (CycloneDX 1.5) as a
downloadable asset for supply-chain verification.