diff --git a/.github/workflows/bun-compile.yml b/.github/workflows/bun-compile.yml index 7c7fc4a..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 @@ -159,3 +160,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}" +