From 5075cbf1ee7bddc6618588f6e0aa71d8de502849 Mon Sep 17 00:00:00 2001 From: Ricky Jones Date: Wed, 5 Aug 2026 01:59:51 +0100 Subject: [PATCH] add frozen v0.1.1 release bootstrap --- .github/workflows/release-v0.1.1.yml | 72 ++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/release-v0.1.1.yml diff --git a/.github/workflows/release-v0.1.1.yml b/.github/workflows/release-v0.1.1.yml new file mode 100644 index 0000000..5e4dc32 --- /dev/null +++ b/.github/workflows/release-v0.1.1.yml @@ -0,0 +1,72 @@ +name: Release v0.1.1 + +on: + push: + branches: + - main + paths: + - ".github/workflows/release-v0.1.1.yml" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Check out the frozen release commit + uses: actions/checkout@v4 + with: + ref: 86851d9ed92a8f6a0850e347ddf1c2d9ae4fdbbc + fetch-depth: 0 + + - name: Verify the frozen target + run: test "$(git rev-parse HEAD)" = "86851d9ed92a8f6a0850e347ddf1c2d9ae4fdbbc" + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install build tools + run: python -m pip install --upgrade build pytest + + - name: Run complete test suite + run: python -m pytest -q + + - name: Build wheel and source archive + run: python -m build + + - name: Install and verify built wheel + run: | + python -m pip install --force-reinstall dist/*.whl + cd "${RUNNER_TEMP}" + python - <<'PY' + from commit_gate_core import CommitGate, __version__ + from commit_gate_core.scenario_runner import run_scenario_001 + + assert CommitGate.__name__ == "CommitGate" + assert __version__ == "0.1.1" + assert run_scenario_001()["downstream_send"] is False + print("Release package: PASS") + PY + + - name: Create frozen tag and GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: | + if gh api "repos/${GITHUB_REPOSITORY}/git/ref/tags/v0.1.1" >/dev/null 2>&1; then + echo "Tag v0.1.1 already exists; refusing to overwrite." + exit 1 + fi + if gh release view v0.1.1 >/dev/null 2>&1; then + echo "Release v0.1.1 already exists; refusing to overwrite." + exit 1 + fi + git tag v0.1.1 86851d9ed92a8f6a0850e347ddf1c2d9ae4fdbbc + git push origin refs/tags/v0.1.1 + gh release create v0.1.1 dist/* \ + --verify-tag \ + --title "commit-gate-core v0.1.1" \ + --notes-file RELEASE_NOTES.md