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