-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathazure-piplines.yml
More file actions
81 lines (69 loc) · 2.32 KB
/
azure-piplines.yml
File metadata and controls
81 lines (69 loc) · 2.32 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
trigger:
- develop
stages:
- stage: AndroidStage
pool:
vmImage: 'ubuntu-latest'
dependsOn: []
displayName: Android
jobs:
- job: AndroidJob
displayName: Android
steps:
# replace "key.properties" with your secure file name
- task: DownloadSecureFile@1
name: keyprop
displayName: Download key properties file
inputs:
secureFile: 'key.properties'
# replace "key.jks" with your secure file name
- task: DownloadSecureFile@1
name: key
displayName: Download signing key
inputs:
secureFile: 'android-mya-mobile-release.jks'
# adjust paths and file names here
- task: Bash@3
displayName: Copy config files
inputs:
targetType: 'inline'
script: |
cp $(keyprop.secureFilePath) $(Build.SourcesDirectory)/android/key.properties
cp $(key.secureFilePath) $(Build.SourcesDirectory)/android/app/key.jks
echo "key.properties copied to $(Build.SourcesDirectory)/android/key.properties"
echo "key.jks copied to $(Build.SourcesDirectory)/android/app/key.jks"
- task: FlutterInstall@0
displayName: "Install Flutter SDK"
inputs:
channel: 'stable'
version: 'custom'
customVersion: '3.7.3'
- task: FlutterCommand@0
displayName: "Run Flutter diagnostics"
inputs:
projectDirectory: '.'
arguments: 'doctor -v'
- task: FlutterBuild@0
displayName: "Build application"
inputs:
target: 'aab'
projectDirectory: '$(Build.SourcesDirectory)'
extraArgs: '--flavor prod -t lib/main_production.dart'
# - task: FlutterTest@0
# displayName: "Run unit tests"
# inputs:
# generateCodeCoverageReport: true
# projectDirectory: '$(Build.SourcesDirectory)'
- task: CopyFiles@2
displayName: "Copy app to staging directory"
inputs:
sourceFolder: '$(Agent.BuildDirectory)'
contents: '**/bundle/**'
targetFolder: '$(Build.StagingDirectory)'
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: "Publish AAB file"
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'AAB'
publishLocation: 'Container'