Skip to content

Commit 90b4daa

Browse files
committed
fix release workflows
1 parent 747288f commit 90b4daa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/pre-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Pre Release
2-
on:
2+
on:
33
pull_request:
44
paths: [CHANGELOG.md]
55
branches: [master]
@@ -12,7 +12,7 @@ jobs:
1212
- run: |
1313
source .github/scripts/changelog.sh
1414
git fetch origin --tags
15-
if [[ -z "$(git tag -l "v$version")" ]]; then
15+
if [[ ! -z "$version" && -z "$(git tag -l "v$version")" ]]; then
1616
echo "BODY<<EOF" >> $GITHUB_ENV
1717
echo "$(IFS=$'\n'; echo "${log[*]}")" >> $GITHUB_ENV
1818
echo "EOF" >> $GITHUB_ENV

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- run: |
1414
source .github/scripts/changelog.sh
1515
git fetch origin --tags
16-
if [[ -z "$(git tag -l "v$version")" ]]; then
16+
if [[ ! -z "$version" && -z "$(git tag -l "v$version")" ]]; then
1717
git tag "v$major.$minor.$patch"
1818
git tag "v$major.$minor" --force
1919
git tag "v$major" --force

0 commit comments

Comments
 (0)