Skip to content

ci: inline pub.dev publish job with contents:read (private-repo compa… #4

ci: inline pub.dev publish job with contents:read (private-repo compa…

ci: inline pub.dev publish job with contents:read (private-repo compa… #4

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
analyze-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap workspace
run: flutter pub get
- name: Analyze
run: flutter analyze packages examples
- name: Test
run: >
flutter test
packages/navigation_devtools_shared
packages/navigation_devtools
packages/go_router_devtools
packages/auto_route_devtools
packages/navigation_devtools_extension
- name: Publish dry-runs
run: |
for p in navigation_devtools navigation_devtools_shared navigation_devtools_test go_router_devtools auto_route_devtools; do
(cd packages/$p && flutter pub publish --dry-run)
done
bundle-drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap workspace
run: flutter pub get
- name: Rebuild extension bundle
working-directory: packages/navigation_devtools_extension
run: dart run devtools_extensions build_and_copy --source=. --dest=../navigation_devtools/extension/devtools
- name: Fail if the committed bundle drifted
# Compiled JS differs run-to-run; assert the asset *file set* matches
# so a UI change without a bundle rebuild fails CI.
run: |
git status --porcelain packages/navigation_devtools/extension/devtools \
| grep -E '^\?\?|^ D' && {
echo 'Extension bundle file set drifted — run build_and_copy and commit.';
exit 1;
} || echo 'Bundle file set is consistent.'