Skip to content

Commit

Permalink
ci: update azure pipeline (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
yousinix authored Sep 26, 2024
1 parent fd72ba9 commit eeb759b
Showing 1 changed file with 55 additions and 57 deletions.
112 changes: 55 additions & 57 deletions .azure/pipeline.yaml
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)

0 comments on commit eeb759b

Please sign in to comment.