diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 502f540..a323a63 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -24,6 +24,42 @@ on: workflow_dispatch: jobs: + # ── Name the candidate ──────────────────────────────────────────────── + # + # Every push to `qa` is a release candidate, so every push gets a tag: + # v-rc, N incrementing. That is the answer to "which build is on + # qa right now, and is it the one I tested?" — a question that otherwise gets + # answered from memory. + # + # This runs FIRST and does not depend on the gates, deliberately. A red + # candidate needs a name more than a green one does: "rc3 failed + # release-tests on windows" is a sentence you can act on; "qa is red" is not. + # Red on qa is a working gate, not an incident — it is the branch saying this + # is not production worth yet. Fix on dev, get dev green, push qa again. + # + # release.yml excludes v*-rc* so a candidate never publishes a release. + rc-tag: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + - name: Stamp the next rc + shell: bash + run: | + set -euo pipefail + v=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1) + [ -n "$v" ] || { echo "no version in Cargo.toml" >&2; exit 1; } + # Numeric sort on the rc ordinal: -rc10 must beat -rc9, and a plain + # lexical sort gets that backwards from the tenth candidate on. + n=$(git tag -l "v$v-rc*" | sed "s|^v$v-rc||" | sort -n | tail -1) + tag="v$v-rc$(( ${n:-0} + 1 ))" + git tag "$tag" + git push origin "$tag" + echo "### Candidate \`$tag\`" >> "$GITHUB_STEP_SUMMARY" + # The debug suite runs on every dev push. Release is a DIFFERENT build: # overflow checks are off, debug_assert! is compiled out, and inlining # changes what the optimiser can prove. A test that only passes in debug is diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af2d7e1..0551126 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,11 @@ on: push: tags: - 'v*' + # NOT the release-candidate tags. Every push to `qa` stamps a + # v-rc so a run can be named, and 'v*' matches those too — + # which would have this workflow build and PUBLISH a GitHub release for + # every candidate, including the red ones. + - '!v*-rc*' permissions: contents: write