From 0447911be8bae8e439c11b29f0badc2258c1a5b6 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Mon, 23 Oct 2023 20:41:31 -0700 Subject: [PATCH] ci: use GITHUB_REF_NAME instead of GITHUB_REF for getting tag --- .github/workflows/publish.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4aa0ebc..7e65fe2 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -19,11 +19,11 @@ jobs: name: Set browser version id: set-browser-version run: | - IFS='/-'; PARTS=($GITHUB_REF); unset IFS; - echo "BROWSER=${PARTS[2]}" >> $GITHUB_ENV - echo "BROWSER_VERSION=${PARTS[3]}" >> $GITHUB_ENV - if [[ "${PARTS[2]}" != "chrome" && "${PARTS[2]}" != "brave" ]]; then - echo "Exiting, invalid browser in tag '${PARTS[2]}', must be either 'chrome' or 'brave'" + IFS='/-'; PARTS=($GITHUB_REF_NAME); unset IFS; + echo "BROWSER=${PARTS[0]}" >> $GITHUB_ENV + echo "BROWSER_VERSION=${PARTS[1]}" >> $GITHUB_ENV + if [[ "${PARTS[0]}" != "chrome" && "${PARTS[0]}" != "brave" ]]; then + echo "Exiting, invalid browser in tag '${PARTS[0]}', must be either 'chrome' or 'brave'" exit 1 fi -