From f68c892caa9f8de268a973852d805673fca7c05f Mon Sep 17 00:00:00 2001 From: Leandro Emmanuel Reina Kiperman Date: Sun, 10 Apr 2022 15:07:30 +0200 Subject: [PATCH] Fix release process? (#2) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8f158b..fd87e52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,7 +71,7 @@ jobs: printf 'Changelog:\n' if [ "${GITHUB_REF_NAME}" = 'main' ] && [ "$(git tag -l | grep -P '^v\d{2}\.\d{2}\.\d{2}\.\d{6}$' | wc -l)" -ge 2 ] ; then LAST_TAG="$(git tag -l --sort=-version:refname | grep -P '^v\d{2}\.\d{2}\.\d{2}\.\d{6}$' | sed -n '2{p;q;}')" - elif [ "$(git tag -l | wc -l)" -ge 2 ] ; then + elif [ "${GITHUB_REF_NAME}" != 'main' ] && [ "$(git tag -l | wc -l)" -ge 2 ] ; then LAST_TAG="$(git tag -l --sort=-version:refname | sed -n '2{p;q;}')" else LAST_TAG="$(git rev-list --max-parents=0 HEAD)"