Skip to content

Commit

Permalink
Merge pull request #2322 from leancodepl/chore/dart-apitool
Browse files Browse the repository at this point in the history
Modify patrol-publish.yaml to check semver before publishing
  • Loading branch information
piotruela authored Sep 9, 2024
2 parents f5a2685 + a07bc05 commit 36517c0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/patrol-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ jobs:
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"
# This step adds the auth token for pub.dev
- name: Set up Dart
Expand All @@ -39,6 +48,15 @@ jobs:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}

- 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
- name: Build DevTools extension
working-directory: packages/patrol_devtools_extension
run: ./publish_to_patrol_extension
Expand Down

0 comments on commit 36517c0

Please sign in to comment.