-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2341 from leancodepl/chore/check-semver
Move check-semver.yaml to separate workflow
- Loading branch information
Showing
2 changed files
with
39 additions
and
17 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,39 @@ | ||
name: check semver | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- 'packages/patrol/**' | ||
|
||
jobs: | ||
check_semver: | ||
name: Check semver | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get last released version | ||
id: get_last_released_version | ||
run: | | ||
last_version=$(git tag --list 'patrol-v*' | grep -v '\-dev\.[0-9]\+$' | sort -V | tail -n 1 | sed 's/^patrol-v//') | ||
echo "last_version=$last_version" >> $GITHUB_ENV | ||
echo "::set-output name=last_version::$last_version" | ||
- name: Set up Dart | ||
uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: stable | ||
|
||
- name: Install dart-apitool | ||
run: dart pub global activate dart_apitool | ||
|
||
- name: Check API changes | ||
run: | | ||
dart-apitool diff \ | ||
--old pub://patrol/${{ steps.get_last_released_version.outputs.last_version }} \ | ||
--new packages/patrol |
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