From 7db3bbbb10eb67e0c0f95482b05d7fca59c795b7 Mon Sep 17 00:00:00 2001 From: Omkar Gaikwad Date: Thu, 26 Nov 2026 06:57:43 +0000 Subject: [PATCH 1/3] ci(release): add an environment and provenance to the publish job The publish-release job can write release files, and no approval gate protects it. The release archives have no provenance. The job now uses the environment "release". The protection rules of an environment are a repository setting. The job also creates a provenance attestation for the archives before the upload. The publish condition moved from the upload step to the job, so a manual run with no tag skips the job. .dockerignore now lists **/.env and dist. The Dockerfile copies the whole build context, so a local build copied these files into the image. --- .dockerignore | 2 ++ .github/workflows/release.yml | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 3ea5b1ba6..9d3f41bc3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,3 +6,5 @@ __pycache__ results .jetskicli +**/.env +dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c5cafa1e..54583dfc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,9 +145,15 @@ jobs: publish-release: needs: build-artifacts - if: github.event_name != 'pull_request' + # Publish only for a release, or for a manual run with a tag. + if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '') + # The protection rules of this environment are a repository setting. + environment: release permissions: contents: write + # For the provenance attestation. + id-token: write + attestations: write runs-on: ubuntu-latest steps: - name: Download all build artifacts @@ -157,8 +163,14 @@ jobs: pattern: binary-* merge-multiple: true + # To verify a download: + # gh attestation verify FILE --repo GoogleCloudPlatform/evalbench + - name: Attest the release archives + uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 + with: + subject-path: release-assets/* + - name: Upload Release Assets - if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '') uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2 with: tag_name: ${{ github.event.release.tag_name || github.event.inputs.tag_name }} From 547ff9acded6cef2ad39b98f44d79407bb6cd006 Mon Sep 17 00:00:00 2001 From: Omkar Gaikwad Date: Wed, 2 Dec 2026 06:59:48 +0000 Subject: [PATCH 2/3] ci(release): document the strict attestation check, ignore all .env files - The verify command now gives the signer workflow and the source ref. With --repo only, an attestation from each workflow of the repo passes. - README.md has the same command. - .dockerignore lists **/.env* and keeps .env.example. --- .dockerignore | 4 +++- .github/workflows/release.yml | 9 +++++++-- README.md | 9 +++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9d3f41bc3..0a32d0e8d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,5 +6,7 @@ __pycache__ results .jetskicli -**/.env +**/.env* +# A template with no secret values. +!**/.env.example dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54583dfc6..134671d30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -163,8 +163,13 @@ jobs: pattern: binary-* merge-multiple: true - # To verify a download: - # gh attestation verify FILE --repo GoogleCloudPlatform/evalbench + # To verify a download, give the workflow and the tag of the release: + # gh attestation verify FILE --repo GoogleCloudPlatform/evalbench \ + # --signer-workflow GoogleCloudPlatform/evalbench/.github/workflows/release.yml \ + # --source-ref refs/tags/vX.Y.Z + # --source-ref is the ref that the run started from. For a release, it is + # the tag. For a manual run, it is the branch or tag of that run, so + # start a manual run from the tag. - name: Attest the release archives uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 with: diff --git a/README.md b/README.md index 9330168ce..228ef2a84 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,15 @@ uv sync The examples below use the clone and `./evalbench/run.sh`, which wraps `uv run evalbench/evalbench.py --experiment_config="$EVAL_CONFIG"`. +**Release binaries.** Each [GitHub release](https://github.com/GoogleCloudPlatform/evalbench/releases) also has a standalone binary for Linux, macOS, and Windows. The archives have a provenance attestation. Older releases have none. To verify a download with the [GitHub CLI](https://cli.github.com/), give the release workflow and the tag of the release: + +```bash +gh attestation verify linux.x64.evalbench.tar.gz \ + --repo GoogleCloudPlatform/evalbench \ + --signer-workflow GoogleCloudPlatform/evalbench/.github/workflows/release.yml \ + --source-ref refs/tags/vX.Y.Z +``` + ### 2. Configure GCP authentication The bundled examples use Gemini on Vertex AI — for the simulated user, LLM-based scorers, and NL2SQL generation. If gcloud is not installed already, follow the [gcloud installation guide](https://cloud.google.com/sdk/docs/install#installation_instructions), then: From 35fb5e4e6b28f03f143f182ef6e077389f6cafa0 Mon Sep 17 00:00:00 2001 From: Omkar Gaikwad Date: Wed, 2 Dec 2026 08:15:52 +0000 Subject: [PATCH 3/3] ci(release): shorten the comment on the attestation check --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 134671d30..3a27f1a2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -167,9 +167,7 @@ jobs: # gh attestation verify FILE --repo GoogleCloudPlatform/evalbench \ # --signer-workflow GoogleCloudPlatform/evalbench/.github/workflows/release.yml \ # --source-ref refs/tags/vX.Y.Z - # --source-ref is the ref that the run started from. For a release, it is - # the tag. For a manual run, it is the branch or tag of that run, so - # start a manual run from the tag. + # Start a manual run from the tag. If not, --source-ref is the branch of the run. - name: Attest the release archives uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 with: