Skip to content

Commit

Permalink
fix detection of trigger of release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
finswimmer authored and abn committed Feb 10, 2022
1 parent c5d3956 commit 453f6fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 453f6fb

Please sign in to comment.