File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 8585 set -x
8686 if [[ '${{ inputs.release_type }}' = custom ]]; then
8787 version_number=$(echo ${{ inputs.custom_version }} | sed s/^v//)
88- elif [[ '${{ inputs.release_type }}' = auto || '${{ inputs.release_type }}' = prerelease ]]; then
88+ elif [[ '${{ inputs.release_type }}' = auto ]]; then
8989 version_number=$(git-cliff --bumped-version | sed s/^v//)
90+
91+ # If there are no commits that increase semver, break
92+ if [[ "$(git describe --tags --abbrev=0)" = "v${version_number}" ]]; then
93+ echo "::error title=Nothing to release::There were no commits that trigger a version bump since the last release"
94+ exit 1
95+ fi
96+ elif [[ '${{ inputs.release_type }}' = prerelease ]]; then
97+ # Prereleases only ever increase the patch version
98+ version_number=$(git-cliff --bump patch --context | jq -r '.[0].version' | sed s/^v//)
9099 else
91100 version_number=$(git-cliff --bump '${{ inputs.release_type }}' --context | jq -r '.[0].version' | sed s/^v//)
92101 fi
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ split_commits = false
7474commit_preprocessors = []
7575# regex for parsing and grouping commits
7676commit_parsers = [
77- { message = " ^feat" , group = " <!-- 0 -->🚀 Features" },
77+ { message = " ^feat|^patch " , group = " <!-- 0 -->🚀 Features" },
7878 { message = " ^fix|^bug" , group = " <!-- 1 -->🐛 Bug Fixes" },
7979 # { message = "^doc", group = "<!-- 3 -->📚 Documentation" },
8080 { message = " ^doc" , skip = true },
You can’t perform that action at this time.
0 commit comments