Last active
February 24, 2021 22:41
-
-
Save zhangtaii/93088c1431e2b95efa2b839972166763 to your computer and use it in GitHub Desktop.
Setup Azure Pipelines for React Native
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
trigger: | |
branches: | |
include: | |
- master | |
- releases/* | |
exclude: | |
- refs/tag/* | |
pool: | |
vmImage: 'macOS-10.13' | |
steps: | |
- checkout: self | |
persistCredentials: true | |
- task: ShellScript@2 | |
inputs: | |
scriptPath: appcenter-post-clone.sh | |
displayName: Post Clone Script | |
- task: NodeTool@0 | |
inputs: | |
versionSpec: '8.x' | |
displayName: Select Node version | |
- script: yarn install | |
displayName: yarn install | |
- task: ShellScript@2 | |
inputs: | |
scriptPath: appcenter-pre-build.sh | |
displayName: Pre Build Script | |
continueOnError: false | |
- task: Gradle@2 | |
inputs: | |
workingDirectory: 'android' | |
gradleWrapperFile: 'android/gradlew' | |
tasks: 'assembleRelease' | |
continueOnError: false | |
- script: mv android/app/build/outputs/apk/release/app-release-unsigned.apk app-release.apk | |
displayName: Android Postprocess | |
continueOnError: false | |
- task: AndroidSigning@3 | |
inputs: | |
apkFiles: 'app-release.apk' | |
apksign: true # Optional | |
apksignerKeystoreFile: 'my-release-key.keystore' # Required when apksign == True | |
apksignerKeystorePassword: $(KeystorePassword) # Optional | |
apksignerKeystoreAlias: $(KeystoreAlias) # Optional | |
apksignerKeyPassword: $(KeyPassword) # Optional | |
#apksignerArguments: '--verbose' # Optional | |
#apksignerFile: # Optional | |
#zipalign: true # Optional | |
#zipalignFile: # Optional | |
- task: CopyFiles@2 | |
inputs: | |
contents: 'app-release.apk' | |
targetFolder: $(Build.ArtifactStagingDirectory) | |
- task: ShellScript@2 | |
inputs: | |
scriptPath: appcenter-post-build.sh | |
displayName: Post Build Script | |
- task: PublishBuildArtifacts@1 | |
- task: AppCenterDistribute@1 | |
inputs: | |
serverEndpoint: 'appcenter' | |
appSlug: 'place your appSlug herer' | |
appFile: 'app-release.apk' | |
releaseNotesOption: 'input' # Options: input, file | |
releaseNotesInput: $(Build.SourceVersionMessage) # Required when releaseNotesOption == Input | |
distributionGroupId: 'place your distributionGroupId here' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
##[error]Not found scriptPath: /Users/runner/runners/2.163.1/work/1/s/appcenter-post-clone.sh
##[error]Bash failed with error: Not found scriptPath: /Users/runner/runners/2.163.1/work/1/s/appcenter-post-clone.sh