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 2828 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2929 - name : Get Semantic Release Version
3030 id : get-version
31- run : echo "::set-output name=version::$(grep -oP '\[\d+\.\d+\.\d+\]' CHANGELOG.md | tr -d '[]')"
31+ run : |
32+ VERSION=$(npx semantic-release --dry-run 2>&1 | grep -o 'Release note for version [0-9]\+\.[0-9]\+\.[0-9]\+' | head -1 | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
33+ if [ -z "$VERSION" ]; then
34+ echo "❌ No version could be detected by semantic-release"
35+ echo "This usually means no commits warrant a release (no feat/fix/breaking changes)"
36+ exit 1
37+ fi
38+ echo "version=$VERSION" >> $GITHUB_OUTPUT
3239
3340 - name : show version
3441 run : |
Original file line number Diff line number Diff line change 77 "preset" : " angular" ,
88 "releaseRules" : [
99 {"breaking" : true , "release" : " minor" },
10- {"tag" : " Breaking" , "release" : " minor" }
10+ {"tag" : " Breaking" , "release" : " minor" },
11+ {"type" : " merge" , "release" : " patch" },
12+ {"subject" : " *Merge pull request*" , "release" : " patch" }
1113 ]
1214 }
1315 ],
You can’t perform that action at this time.
0 commit comments