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