-
Notifications
You must be signed in to change notification settings - Fork 38
/
azure-pipelines-android.yml
63 lines (57 loc) · 1.86 KB
/
azure-pipelines-android.yml
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
# https://techcommunity.microsoft.com/t5/windows-dev-appconsult/using-azure-devops-to-create-a-ci-cd-pipeline-for-an-android/ba-p/1094422
# Based on: https://github.com/staff0rd/react-native-pipeline/blob/master/azure-pipelines-android.yml
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
trigger:
- main
jobs:
- job: Build_Android
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '16.13.2'
- task: Cache@2
inputs:
key: 'yarn | "$(Agent.OS)" | yarn.lock'
restoreKeys: |
yarn | "$(Agent.OS)"
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages
- script: yarn install --frozen-lockfile
- task: Gradle@2
inputs:
workingDirectory: 'android'
gradleWrapperFile: 'android/gradlew'
gradleOptions: '-Xmx3072m'
tasks: 'bundleRelease assembleRelease'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: android/app/build/outputs/apk/release/app-release.apk
artifactName: drop
publishLocation: 'container'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: android/app/build/outputs/bundle/release/app-release.aab
artifactName: drop
publishLocation: 'container'
- job: Build_iOS
pool:
vmImage: 'macOS-11'
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '16.13.2'
- task: Cache@2
inputs:
key: 'yarn | "$(Agent.OS)" | yarn.lock'
restoreKeys: |
yarn | "$(Agent.OS)"
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages
- script: yarn install --frozen-lockfile
- script: cd ios && pod install
- script: cd ios && xcodebuild clean archive -workspace testCiCdReactNative.xcworkspace -scheme testCiCdReactNative -archivePath testCiCdReactNative.xcarchive CODE_SIGNING_ALLOWED=NO | xcpretty