File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- set -e
3+ set -euo pipefail
44
55if [[ $GITHUB_REF != " refs/tags/" * ]]; then
66 echo " ::warning::Skipping: This should only run on tags push or on release instead of '$GITHUB_EVENT_NAME '." ;
99
1010git fetch origin +refs/tags/* :refs/tags/*
1111
12- CURRENT_TAG=${3:- $(git describe --abbrev=0 --tags " $( git rev-list --tags --skip=1 --max-count=1) " 2>/ dev/ null || true)}
1312NEW_TAG=${4:- " ${GITHUB_REF/ refs\/ tags\/ / } " }
13+ MAJOR_VERSION=$( echo " $NEW_TAG " | cut -d. -f1)
14+
15+
16+ CURRENT_TAG=${3:- $(git tag -l --sort=-version: refname " $MAJOR_VERSION .*" | grep -v " $NEW_TAG " | head -1 || true)}
17+
1418
1519if [[ -z $CURRENT_TAG ]]; then
1620 echo " ::warning::Initial release detected unable to determine any tag diff."
You can’t perform that action at this time.
0 commit comments