Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,26 @@ on:
push:
tags:
- 'v*'
# Runs the gates alone, without an upload, to check them off a tag.
workflow_dispatch:

jobs:
gates:
uses: NaNIsaac/.github/.github/workflows/publish-gates.yml@e2bfb9b4aa7820e8efe43afddf2d2308c6069ae3
permissions:
contents: read
with:
import-name: codigest
python-version: "3.15"
# the terminal tests drive bash, zsh and pwsh on a pseudo-terminal; the runner has no zsh
test-command: sudo apt-get install -y -qq zsh && uv run --with pytest pytest -q
smoke: codigest --help
# PEM private-key patterns and mask templates in the redaction code, not keys
leak-allow: "codigest/core/redact.py: private-key: 2"

pypi:
needs: gates
if: startsWith(github.ref, 'refs/tags/v')
name: Build and publish to PyPI
runs-on: ubuntu-latest
environment: release
Expand All @@ -16,8 +33,11 @@ jobs:
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.3
- run: uv python install 3.15
- run: uv build
# The files the gates checked, not a new build
- uses: actions/download-artifact@v8
with:
name: publish-gates-dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1

mcp:
Expand Down
Loading