-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new github workflow to check for semvers in beta/stable PRs
- Loading branch information
1 parent
15f7635
commit ccf1f04
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Check PR title for proper semver | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- beta | ||
- stable | ||
|
||
jobs: | ||
check-pr-semver-title: | ||
runs-on: ubuntu-latest | ||
name: Validate PR Title | ||
|
||
steps: | ||
- name: Check PR title format | ||
run: | | ||
version="${{ github.event.pull_request.title }}" | ||
if ! [[ "$version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then | ||
echo "Invalid semver: '$version'!" | ||
exit 1 | ||
fi | ||
echo "Version is proper semver: $version" | ||