diff --git a/.dockerignore b/.dockerignore index 3ea5b1ba..0a32d0e8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,3 +6,7 @@ __pycache__ results .jetskicli +**/.env* +# A template with no secret values. +!**/.env.example +dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c5cafa1..3a27f1a2 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,17 @@ jobs: pattern: binary-* merge-multiple: true + # 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 + # 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: + 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 }} diff --git a/README.md b/README.md index 9330168c..228ef2a8 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: