fix(release): handle missing previous tag in release workflow
This commit is contained in:
1 parent
dd91e7ed5a
commit
30801c747a
2 files changed
+17
-4
No files matched your search
@@ -63,7 +63,7 @@ jobs:
|
||||
TAG="${{ github.event.inputs.tag || github.ref_name }}"
|
||||
API="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases"
|
||||
|
||||
PREV_TAG=$(git tag --sort=-version:refname | grep -v "^${TAG}$" | head -1)
|
||||
PREV_TAG=$(git tag --sort=-version:refname | { grep -v "^${TAG}$" || true; } | head -1)
|
||||
if [ -n "$PREV_TAG" ]; then
|
||||
RANGE="${PREV_TAG}..${TAG}"
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user