Skip to content

Feature branch

Feature branch #13

name: Upload Widgetbook Review - Staging
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build App
run: |
flutter pub get
flutter gen-l10n
- name: Install Widgetbook CLI
run: dart pub global activate -s git https://github.com/widgetbook/widgetbook.git --git-path packages/widgetbook_cli --git-ref feat/cli/visual-diff
- name: Build Widgetbook
working-directory: widgetbook
run: |
flutter pub get
dart run build_runner build -d
flutter build web -t lib/main.dart
- name: Upload Widgetbook
working-directory: widgetbook
run: |
widgetbook_staging publish \
--api-key ${{ secrets.WIDGETBOOK_CLOUD_API_KEY_STAGING }} \
--repository $GITHUB_REPOSITORY \
--actor $GITHUB_ACTOR \
--base-branch $GITHUB_BASE_REF \
--branch $GITHUB_HEAD_REF \
--commit ${{ github.event.pull_request.head.sha }} \
--experimental-visual-diff