From d3e6de4aa5acfbf5a83306df8f8db2eacbe6d5b7 Mon Sep 17 00:00:00 2001 From: Dylan Frankland Date: Mon, 5 Oct 2026 18:09:56 +0000 Subject: [PATCH] ci: run a release through trunk flakytests before promoting it Both `trunk`s customers install, the bash launcher and the new CLI, must run the version pinned with TRUNK_ANALYTICS_CLI_VERSION before it becomes latest. Needs trunk-io/trunk#34317 and trunk-io/trunk2#6728 released. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/promote_release.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/promote_release.yml b/.github/workflows/promote_release.yml index f58e73fa..3f9261cb 100644 --- a/.github/workflows/promote_release.yml +++ b/.github/workflows/promote_release.yml @@ -34,6 +34,26 @@ jobs: fi gh release view "${VERSION}" --json tagName,isDraft --jq 'if .isDraft then error("release is a draft") else .tagName end' + # Both `trunk`s customers install: the bash launcher (trunk-io/trunk#34317) and the new CLI + # (trunk-io/trunk2#6728), each pinned with TRUNK_ANALYTICS_CLI_VERSION. + - name: Run ${{ inputs.version }} through trunk flakytests + run: | + dir="$(mktemp -d)" + curl -fsSL https://trunk.io/releases/trunk -o "${dir}/launcher" + chmod +x "${dir}/launcher" + curl -fsSL https://install.trunk.io | sh -s -- --install-dir "${dir}/cli" + for trunk in launcher cli/trunk; do + if ! actual="$(TRUNK_CACHE="${dir}/cache/${trunk%%/*}" TRUNK_ANALYTICS_CLI_VERSION="${VERSION}" \ + "${dir}/${trunk}" flakytests --version | tail -n1 | awk '{print $NF}')"; then + echo "::error::${trunk} could not download or run ${VERSION}" + exit 1 + fi + if [[ ${actual} != "${VERSION}" ]]; then + echo "::error::${trunk} ran ${actual}, not ${VERSION}; does it read TRUNK_ANALYTICS_CLI_VERSION yet?" + exit 1 + fi + done + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: