diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f807550..579132e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 @@ -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: