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 1
1
#! /usr/bin/env bash
2
2
3
- set -e
3
+ set -euo pipefail
4
4
5
5
if [[ $GITHUB_REF != " refs/tags/" * ]]; then
6
6
echo " ::warning::Skipping: This should only run on tags push or on release instead of '$GITHUB_EVENT_NAME '." ;
9
9
10
10
git fetch origin +refs/tags/* :refs/tags/*
11
11
12
- CURRENT_TAG=${3:- $(git describe --abbrev=0 --tags " $( git rev-list --tags --skip=1 --max-count=1) " 2>/ dev/ null || true)}
13
12
NEW_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
+
14
18
15
19
if [[ -z $CURRENT_TAG ]]; then
16
20
echo " ::warning::Initial release detected unable to determine any tag diff."
You can’t perform that action at this time.
0 commit comments