127 строки
5.6 KiB
YAML
127 строки
5.6 KiB
YAML
# This file defines the build steps to publish a release
|
|
name: $(Date:yyyyMMdd).$(Rev:.r)
|
|
|
|
trigger:
|
|
batch: true
|
|
branches:
|
|
include:
|
|
- master
|
|
- fb60merge
|
|
- fabric
|
|
paths:
|
|
exclude:
|
|
- package.json
|
|
|
|
pr: none
|
|
|
|
jobs:
|
|
- job: RNGithubPublish
|
|
displayName: React-Native GitHub Publish
|
|
pool:
|
|
vmImage: vs2017-win2016
|
|
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
|
|
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
|
|
steps:
|
|
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
|
|
clean: true # whether to fetch clean each time
|
|
# fetchDepth: 2 # the depth of commits to ask Git to fetch
|
|
lfs: false # whether to download Git-LFS files
|
|
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
|
|
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
|
|
|
|
- task: CmdLine@2
|
|
displayName: npm install
|
|
inputs:
|
|
script: npm install
|
|
|
|
- task: CmdLine@2
|
|
displayName: Bump package version
|
|
inputs:
|
|
script: node .ado/bumpFileVersions.js
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: NuGet restore
|
|
inputs:
|
|
command: restore
|
|
restoreSolution: ReactAndroid/packages.config
|
|
feedsToUse: config
|
|
#vstsFeed: # Required when feedsToUse == Select
|
|
#includeNuGetOrg: true # Required when feedsToUse == Select
|
|
nugetConfigPath: ReactAndroid/NuGet.Config
|
|
#externalFeedCredentials: # Optional
|
|
#noCache: false
|
|
#disableParallelProcessing: false
|
|
restoreDirectory: packages/
|
|
verbosityRestore: Detailed # Options: quiet, normal, detailed
|
|
#packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg' # Required when command == Push
|
|
#nuGetFeedType: 'internal' # Required when command == Push# Options: internal, external
|
|
#publishVstsFeed: # Required when command == Push && NuGetFeedType == Internal
|
|
#publishPackageMetadata: true # Optional
|
|
#allowPackageConflicts: # Optional
|
|
#publishFeedCredentials: # Required when command == Push && NuGetFeedType == External
|
|
#verbosityPush: 'Detailed' # Options: quiet, normal, detailed
|
|
#packagesToPack: '**/*.csproj' # Required when command == Pack
|
|
#configuration: '$(BuildConfiguration)' # Optional
|
|
#packDestination: '$(Build.ArtifactStagingDirectory)' # Optional
|
|
#versioningScheme: 'off' # Options: off, byPrereleaseNumber, byEnvVar, byBuildNumber
|
|
#includeReferencedProjects: false # Optional
|
|
#versionEnvVar: # Required when versioningScheme == ByEnvVar
|
|
#majorVersion: '1' # Required when versioningScheme == ByPrereleaseNumber
|
|
#minorVersion: '0' # Required when versioningScheme == ByPrereleaseNumber
|
|
#patchVersion: '0' # Required when versioningScheme == ByPrereleaseNumber
|
|
#packTimezone: 'utc' # Required when versioningScheme == ByPrereleaseNumber# Options: utc, local
|
|
#includeSymbols: false # Optional
|
|
#toolPackage: # Optional
|
|
#buildProperties: # Optional
|
|
#basePath: # Optional
|
|
#verbosityPack: 'Detailed' # Options: quiet, normal, detailed
|
|
#arguments: # Required when command == Custom
|
|
|
|
- task: Gradle@1
|
|
displayName: gradlew installArchives
|
|
inputs:
|
|
gradleWrapperFile: gradlew
|
|
# workingDirectory: src\react-native\
|
|
options: -Pparam="excludeLibs"
|
|
tasks: installArchives
|
|
publishJUnitResults: false
|
|
#testResultsFiles: '**/TEST-*.xml' # Required when publishJUnitResults == True
|
|
#testRunTitle: # Optional
|
|
#codeCoverageToolOption: 'None' # Optional. Options: none, cobertura, jaCoCo
|
|
#codeCoverageClassFilesDirectories: 'build/classes/main/' # Required when codeCoverageToolOption == False
|
|
#codeCoverageClassFilter: # Optional
|
|
#codeCoverageFailIfEmpty: false # Optional
|
|
#javaHomeOption: 'JDKVersion' # Options: jDKVersion, path
|
|
#jdkVersionOption: 'default' # Optional. Options: default, 1.11, 1.10, 1.9, 1.8, 1.7, 1.6
|
|
#jdkDirectory: # Required when javaHomeOption == Path
|
|
#jdkArchitectureOption: 'x64' # Optional. Options: x86, x64
|
|
#gradleOptions: '-Xmx1024m' # Optional
|
|
#sonarQubeRunAnalysis: false
|
|
#sqGradlePluginVersionChoice: 'specify' # Required when sonarQubeRunAnalysis == True# Options: specify, build
|
|
#sonarQubeGradlePluginVersion: '2.6.1' # Required when sonarQubeRunAnalysis == True && SqGradlePluginVersionChoice == Specify
|
|
#checkStyleRunAnalysis: false # Optional
|
|
#findBugsRunAnalysis: false # Optional
|
|
#pmdRunAnalysis: false # Optional
|
|
|
|
- template: templates\prep-android-nuget.yml
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'NuGet pack'
|
|
inputs:
|
|
command: pack
|
|
packagesToPack: 'ReactAndroid/ReactAndroid.nuspec'
|
|
packDestination: '$(Build.StagingDirectory)\final'
|
|
|
|
- task: CmdLine@2
|
|
displayName: Do Publish
|
|
inputs:
|
|
script: node .ado/publish.js
|
|
env:
|
|
BUILD_STAGINGDIRECTORY: $(Build.StagingDirectory)
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish final artifacts'
|
|
inputs:
|
|
PathtoPublish: '$(Build.StagingDirectory)\final'
|
|
ArtifactName: 'ReactNative-Final'
|