From 3f788c1ac3e0a6e008bce6fc1341287cc0dd598c Mon Sep 17 00:00:00 2001 From: Ali Ibrahim Jr <48456829+IBJunior@users.noreply.github.com> Date: Fri, 23 Oct 2026 13:11:22 +0200 Subject: [PATCH] ci(release): skip creating the release when one already exists Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 8 +++++++- AGENTS.md | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3977e91..a5e0b7c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,12 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 - - run: gh release create "$GITHUB_REF_NAME" --generate-notes + # A hand-written release published before the tag run finishes is kept as-is. + - run: | + if gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1; then + echo "Release $GITHUB_REF_NAME already exists; leaving it as published." + else + gh release create "$GITHUB_REF_NAME" --generate-notes + fi env: GH_TOKEN: ${{ github.token }} diff --git a/AGENTS.md b/AGENTS.md index 07b3b7f..c54d3ca 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -495,7 +495,8 @@ Unit tests only, via Vitest — see [docs/TESTING.md](docs/TESTING.md) for the f commit and cover every truncation / error / empty-result path — that's where agents get misled. - `pnpm test` stays unit-only and free regardless of what the eval layer grows into. - **CI** (`.github/workflows/`): `ci.yml` gates PRs on `pnpm test` + `tsc --noEmit`; `release.yml` - gates `v*` tags on the same before publishing the release. + gates `v*` tags on the same before publishing the release. If a release for the tag already + exists (written by hand), it skips creation and leaves that release untouched. ## Evals (`eval/`)