Skip to content

Instantly share code, notes, and snippets.

@RemeJuan
Last active April 27, 2020 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RemeJuan/d5bfaf9fc59a666527f519cd4b0266ed to your computer and use it in GitHub Desktop.
Save RemeJuan/d5bfaf9fc59a666527f519cd4b0266ed to your computer and use it in GitHub Desktop.
Flutter pipeline config
pool:
name: Azure Pipelines
demands: xcode
steps:
- script: 'brew install fastlane'
displayName: 'Install fastlane'
- script: |
gem install bundler
bundle update --bundler
bundle install
workingDirectory: ios
displayName: 'Ruby bundle setup'
- script: 'bundle exec fastlane profile'
workingDirectory: ios
displayName: 'Update provisioning profile'
- task: InstallAppleProvisioningProfile@1
displayName: 'Install an Apple provisioning profile'
inputs:
provisioningProfileLocation: sourceRepository
provProfileSourceRepository: 'ios/provisioning_profiles/$(PROVISIONING_PROFILE_NAME).mobileprovision'
- task: InstallAppleCertificate@2
displayName: 'Install an Apple Distribution Certificate'
inputs:
certSecureFile: '697865c1-f83f-4ff6-a3d3-60b608310b22'
certPwd: '$(p12pass)'
signingIdentity: '$(bundleId)'
- task: aloisdeniel.flutter.flutter-install.FlutterInstall@0
displayName: 'Flutter Install'
- task: aloisdeniel.flutter.flutter-build.FlutterBuild@0
displayName: 'Flutter Build iOS'
inputs:
target: ios
buildNumber: '$(buildNumber)'
buildName: '$(package.version)'
iosCodesign: false
- script: 'bundle exec fastlane ios ci'
workingDirectory: ios
displayName: 'Generate IPA Archive'
- task: ms-vsclient.app-store.app-store-release.AppStoreRelease@1
displayName: 'Publish to TestFlight'
inputs:
serviceEndpoint: 'Itunes Connect'
appIdentifier: '$(bundleId)'
shouldSkipWaitingForProcessing: true
teamId: '$(APPLE_TEAM_ID)'
teamName: '$(APPLE_TEAM_NAME)'
- script: |
$(FlutterToolPath)/flutter build apk --split-per-abi --build-number=$(buildNumber) --build-name=$(package.version)
displayName: 'Build APKs'
- task: ms-vsclient.google-play.google-play-release.GooglePlayRelease@3
displayName: 'Release to internal'
inputs:
authType: JsonFile
serviceAccountKey: 'fastlane/defaults/android/api-playstore-deployment.json'
apkFile: '$(Build.SourcesDirectory)/build/app/outputs/apk/release/app-arm64-v8a-release.apk'
additionalApks: '$(Build.SourcesDirectory)/build/app/outputs/apk/release/*.apk'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment