-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,66 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- '*' | ||
- "*" | ||
|
||
stages: | ||
- stage: WidgetbookHostingStage | ||
dependsOn: [] | ||
displayName: Hosting | ||
jobs: | ||
pr: | ||
branches: | ||
include: | ||
- "*" | ||
|
||
- job: HostingJob | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
stages: | ||
- stage: WidgetbookHostingStage | ||
displayName: Hosting | ||
steps: | ||
|
||
- task: FlutterInstall@0 | ||
displayName: "Install Flutter SDK" | ||
inputs: | ||
mode: 'auto' | ||
channel: 'stable' | ||
version: 'latest' | ||
jobs: | ||
- job: HostingJob | ||
displayName: Hosting | ||
pool: | ||
vmImage: "ubuntu-latest" | ||
steps: | ||
- task: FlutterInstall@0 | ||
displayName: "Install Flutter SDK" | ||
inputs: | ||
mode: "auto" | ||
channel: "stable" | ||
version: "latest" | ||
|
||
- task: Bash@3 | ||
displayName: "Run localization" | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
$(FlutterToolPath)/flutter pub get | ||
$(FlutterToolPath)/flutter gen-l10n | ||
- task: Bash@3 | ||
displayName: "Bootstrap App" | ||
inputs: | ||
targetType: "inline" | ||
script: | | ||
$(FlutterToolPath)/flutter pub get | ||
$(FlutterToolPath)/flutter gen-l10n | ||
- task: Bash@3 | ||
displayName: "Run build_runner" | ||
inputs: | ||
workingDirectory: 'widgetbook' | ||
targetType: 'inline' | ||
script: | | ||
$(FlutterToolPath)/flutter pub get | ||
$(FlutterToolPath)/flutter pub run build_runner build --delete-conflicting-outputs | ||
- task: Bash@3 | ||
displayName: "Build Widgetbook" | ||
inputs: | ||
workingDirectory: "widgetbook" | ||
targetType: "inline" | ||
script: | | ||
$(FlutterToolPath)/flutter pub get | ||
$(DartToolPath)/dart run build_runner build -d | ||
$(FlutterToolPath)/flutter build web -t lib/main.dart | ||
- task: Bash@3 | ||
displayName: "Build Widgetbook" | ||
inputs: | ||
workingDirectory: 'widgetbook' | ||
targetType: 'inline' | ||
script: | | ||
$(FlutterToolPath)/flutter build web -t lib/main.dart | ||
- task: Bash@3 | ||
displayName: "Install Widgetbook CLI" | ||
inputs: | ||
targetType: "inline" | ||
script: | | ||
$(DartToolPath)/dart pub global activate widgetbook_cli | ||
- task: Bash@3 | ||
displayName: "Activate Widgetbook CLI" | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
$(FlutterToolPath)/flutter pub global activate widgetbook_cli | ||
- task: Bash@3 | ||
displayName: "Push Widgetbook Build (Staging)" | ||
inputs: | ||
workingDirectory: "widgetbook" | ||
targetType: "inline" | ||
script: | | ||
$HOME/.pub-cache/bin/widgetbook_staging cloud build push --api-key $(WIDGETBOOK_STAGING_API_KEY) | ||
- task: Bash@3 | ||
displayName: "Upload Widgetbook" | ||
inputs: | ||
workingDirectory: 'widgetbook' | ||
targetType: 'inline' | ||
script: | | ||
$HOME/.pub-cache/bin/widgetbook cloud build push \ | ||
--api-key 7396fbb0851ab29f0cc78246355b786de54a087dba3828acde90ac7afef7d97f \ | ||
--branch '$(Build.SourceBranch)' \ | ||
--repository '$(Build.DefinitionName)' \ | ||
--commit '$(Build.SourceVersion)' \ | ||
--actor '$(Build.SourceVersionAuthor)' | ||
- task: Bash@3 | ||
displayName: "Push Widgetbook Build (Production)" | ||
inputs: | ||
workingDirectory: "widgetbook" | ||
targetType: "inline" | ||
script: | | ||
$HOME/.pub-cache/bin/widgetbook cloud build push --api-key $(WIDGETBOOK_API_KEY) |