From 453f6fb9b56c2f4fc75b69b820095327de09cb0a Mon Sep 17 00:00:00 2001 From: finswimmer Date: Thu, 10 Feb 2022 16:11:05 +0100 Subject: [PATCH] fix detection of trigger of release pipeline --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b8a1d7502c..40f29c5ff11 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Get tag id: tag run: | - if [[ ${GITHUB_EVENT_NAME} == "tag" ]]; then + if [[ ${GITHUB_REF} == /refs/tags* ]]; then echo ::set-output name=tag::${GITHUB_REF#refs/tags/} else echo ::set-output name=tag::${GITHUB_SHA::7} @@ -50,7 +50,7 @@ jobs: - name: Get tag id: tag run: | - if [[ ${GITHUB_EVENT_NAME} == "tag" ]]; then + if [[ ${GITHUB_REF} == /refs/tags* ]]; then echo ::set-output name=tag::${GITHUB_REF#refs/tags/} else echo ::set-output name=tag::${GITHUB_SHA::7} @@ -107,7 +107,7 @@ jobs: id: tag shell: bash run: | - if [[ ${GITHUB_EVENT_NAME} == "tag" ]]; then + if [[ ${GITHUB_REF} == /refs/tags* ]]; then echo ::set-output name=tag::${GITHUB_REF#refs/tags/} else echo ::set-output name=tag::${GITHUB_SHA::7} @@ -166,7 +166,7 @@ jobs: Release: needs: [Linux, MacOS, Windows] runs-on: ubuntu-latest - if: github.event_name == 'tag' + if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout code