Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Semantic Release Version
id: get-version
run: echo "::set-output name=version::$(grep -oP '\[\d+\.\d+\.\d+\]' CHANGELOG.md | tr -d '[]')"
run: |
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]\+')
if [ -z "$VERSION" ]; then
echo "❌ No version could be detected by semantic-release"
echo "This usually means no commits warrant a release (no feat/fix/breaking changes)"
exit 1
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: show version
run: |
Expand Down
4 changes: 3 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"preset": "angular",
"releaseRules": [
{"breaking": true, "release": "minor"},
{"tag": "Breaking", "release": "minor"}
{"tag": "Breaking", "release": "minor"},
{"type": "merge", "release": "patch"},
{"subject": "*Merge pull request*", "release": "patch"}
]
}
],
Expand Down