Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify patrol-publish.yaml to check semver before publishing #2322

Merged
merged 9 commits into from
Sep 9, 2024
Merged
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
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
Loading