-
Notifications
You must be signed in to change notification settings - Fork 15
45 lines (37 loc) · 1.07 KB
/
widgetbook-review.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Upload Widgetbook Review
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 widgetbook_cli
- 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 publish \
--api-key ${{ secrets.WIDGETBOOK_CLOUD_API_KEY }} \
--repository $GITHUB_REPOSITORY \
--actor $GITHUB_ACTOR \
--base-branch $GITHUB_BASE_REF \
--branch $GITHUB_HEAD_REF \
--commit ${{ github.event.pull_request.head.sha }}