Generate flutter apps with Azure DevOps
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
parameters: | |
- name: appFolder # ex : ./src/MyApp | |
type: string | |
- name: flutterVersion # ex : 1.17.5 | |
type: string | |
- name: appVersion # ex : 1.10.1 | |
type: string | |
- name: appBuildNumer # ex : 303 (/!\ the build number must be incremental when the package is published on the store) | |
type: string | |
steps: | |
- task: FlutterInstall@0 | |
displayName: 'install flutter ${{ parameters.flutterVersion }}' | |
inputs: | |
channel: 'stable' | |
version: 'custom' | |
customVersion: '${{ parameters.flutterVersion }}' | |
- task: FlutterBuild@0 | |
displayName: 'build android aab' | |
inputs: | |
target: 'aab' | |
projectDirectory: '${{ parameters.appFolder }}' | |
buildName: '${{ parameters.appVersion }}' | |
buildNumber: '${{ parameters.appBuildNumber }}' | |
- task: CopyFiles@2 | |
displayName: 'copy android aab' | |
inputs: | |
Contents: '${{ parameters.appFolder }}/**/app.aab' | |
TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.appFolder }}/android' | |
flattenFolders: true | |
- task: PublishBuildArtifacts@1 | |
displayName: 'publish packages' | |
inputs: | |
PathtoPublish: '$(Build.ArtifactStagingDirectory)' | |
ArtifactName: 'packages' | |
publishLocation: 'Container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment