From 854335f43c0576334b5feb88461abeb9d18182f1 Mon Sep 17 00:00:00 2001 From: Kaiyue Jiang Date: Thu, 16 Apr 2026 23:39:12 +0000 Subject: [PATCH 1/2] ci: update V1_LATEST_TAG repo variable on stable releases After creating a stable (non-prerelease) release, update the V1_LATEST_TAG repo variable so the hermes v2 release workflow can restore 'latest' to the correct v1 tag. --- .github/workflows/bun-compile.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/bun-compile.yml b/.github/workflows/bun-compile.yml index 7c7fc4a..4085839 100644 --- a/.github/workflows/bun-compile.yml +++ b/.github/workflows/bun-compile.yml @@ -159,3 +159,13 @@ jobs: $PRERELEASE_FLAG \ artifacts/* + - name: Update V1_LATEST_TAG variable + if: ${{ !contains(inputs.version || github.event.client_payload.version, 'prerelease') }} + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ inputs.version || github.event.client_payload.version }} + run: | + gh api --method PATCH "repos/${{ github.repository }}/actions/variables/V1_LATEST_TAG" \ + -f name="V1_LATEST_TAG" \ + -f value="v${VERSION}" + From d3b28b62c0dfb1060566c589441d5c06e472208e Mon Sep 17 00:00:00 2001 From: Kaiyue Jiang Date: Thu, 16 Apr 2026 23:43:03 +0000 Subject: [PATCH 2/2] fix: add variables: write permission for V1_LATEST_TAG update The GITHUB_TOKEN needs variables: write permission to update repo variables via the API. --- .github/workflows/bun-compile.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bun-compile.yml b/.github/workflows/bun-compile.yml index 4085839..4bb6c6b 100644 --- a/.github/workflows/bun-compile.yml +++ b/.github/workflows/bun-compile.yml @@ -126,6 +126,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + variables: write steps: - name: Download all artifacts uses: actions/download-artifact@v4