Skip to content

Commit 8f928ca

Browse files
committed
Update release action
1 parent 0dc2882 commit 8f928ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ jobs:
4141
GENERATE_DIST: ${{ env.DEFAULT_BRANCH == github.ref_name && '1' || '0' }}
4242

4343
- name: Publish Release
44+
id: publish-release
4445
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
4546
env:
4647
GH_TOKEN: "${{ secrets.PAT }}"
4748
runs: |
48-
COUNT=`gh release list | grep 'latest' | wc -l`
49-
if [ $COUNT 1 == '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
49+
COUNT=$(gh release list | grep 'latest' | wc -l)
50+
if [ $COUNT != '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
5051
5152
git tag "latest"
5253
git push -f origin "latest"

0 commit comments

Comments
 (0)