mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
Update release workflow to extract tag name
This commit is contained in:
parent
0e91a00076
commit
efa9a30a3a
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@ -14,12 +14,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Extract branch name
|
- name: Extract branch name
|
||||||
run: |
|
run: |
|
||||||
export BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
|
export TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})
|
||||||
echo "##[set-output name=branch;]$BRANCH_NAME"
|
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
|
||||||
if [ $BRANCH_NAME = "main" ] || [ $BRANCH_NAME = "master" ]
|
|
||||||
then echo "##[set-output name=tag;]latest"
|
|
||||||
else echo "##[set-output name=tag;]$BRANCH_NAME"
|
|
||||||
fi
|
|
||||||
id: extract_branch
|
id: extract_branch
|
||||||
|
|
||||||
- name: xgo build
|
- name: xgo build
|
||||||
|
Loading…
Reference in New Issue
Block a user