Skip to content

Commit

Permalink
Update release workflow to extract tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Nov 28, 2023
1 parent 0e91a00 commit efa9a30
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ jobs:

- name: Extract branch name
run: |
export BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
echo "##[set-output name=branch;]$BRANCH_NAME"
if [ $BRANCH_NAME = "main" ] || [ $BRANCH_NAME = "master" ]
then echo "##[set-output name=tag;]latest"
else echo "##[set-output name=tag;]$BRANCH_NAME"
fi
export TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
id: extract_branch

- name: xgo build
Expand Down

0 comments on commit efa9a30

Please sign in to comment.