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)"