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
72 changes: 72 additions & 0 deletions .github/workflows/release-v0.1.1.yml
Original file line number Diff line number Diff line change
@@ -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
Loading