From bc7ad83fa2a1e325fab0008c5648eada12a36f22 Mon Sep 17 00:00:00 2001 From: arthur-goldblatt Date: Wed, 19 Aug 2026 13:32:27 -0700 Subject: [PATCH] ci: add safe release preflight --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de21b47..ea4fe05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,7 @@ on: push: tags: - "v*" + workflow_dispatch: permissions: read-all @@ -44,6 +45,7 @@ jobs: run: uv python install 3.11 - name: "Verify tag matches package version" + if: github.event_name == 'push' run: | TAG="${GITHUB_REF_NAME}" VERSION="v$(uv run python -c 'import antares_cli; print(antares_cli.__version__)')" @@ -55,6 +57,9 @@ jobs: - name: "Install dependencies" run: uv sync --frozen --group dev + - name: "Install read-only command dependencies" + run: sudo apt-get update && sudo apt-get install --yes ripgrep + - name: "Run tests" run: uv run pytest -q -p no:cacheprovider @@ -89,6 +94,8 @@ jobs: name: "publish public release" needs: build if: >- + github.event_name == 'push' && + startsWith(github.ref, 'refs/tags/v') && github.repository == 'cisco-foundation-ai/antares-cli' && github.event.repository.visibility == 'public' runs-on: ubuntu-22.04