From 9e4efda153f868100fefd23c7d2ebec6361cfe2c Mon Sep 17 00:00:00 2001 From: Kobi Hikri Date: Tue, 28 Jul 2026 18:55:45 +0300 Subject: [PATCH] ci: build VERSION from env vars instead of interpolating into the shell --- .github/workflows/build-and-draft-release.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-draft-release.yaml b/.github/workflows/build-and-draft-release.yaml index b820851e16..0ad6006fc4 100644 --- a/.github/workflows/build-and-draft-release.yaml +++ b/.github/workflows/build-and-draft-release.yaml @@ -16,8 +16,11 @@ jobs: steps: - name: Set VERSION variable # The head ref looks like release/v1.0.0, and we need to trim the string up to the `/v`. + env: + INPUT_VERSION: ${{ github.event.inputs.version }} + HEAD_REF: ${{ github.head_ref }} run: | - VERSION="${{ github.event.inputs.version || github.head_ref}}" + VERSION="${INPUT_VERSION:-$HEAD_REF}" echo "VERSION=${VERSION##*/v}" >> $GITHUB_ENV - name: Get GitHub app token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0