11name : 0.0.$(Date:yyMM.d)$(Rev:rrr)
22
33parameters :
4- - name : skipNpmPublish
5- displayName : Skip Npm Publish
6- type : boolean
7- default : false
8- - name : skipGitPush
9- displayName : Skip Git Push
10- type : boolean
11- default : false
12- - name : stopOnNoCI
13- displayName : Stop if latest commit is ***NO_CI***
14- type : boolean
15- default : true
164- name : performBeachballCheck
175 displayName : Perform Beachball Check (Disable when promoting)
186 type : boolean
@@ -104,14 +92,10 @@ parameters:
10492variables :
10593 - template : variables/windows.yml
10694 - group : RNW Secrets
107- - name : SkipGitPushPublishArgs
108- value : ' '
10995 - name : FailCGOnAlert
11096 value : false
11197 - name : EnableCodesign
11298 value : false
113- - name : SourceBranchWithFolders
114- value : $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
11599
116100trigger : none
117101pr : none
@@ -142,20 +126,9 @@ extends:
142126 timeoutInMinutes : 120
143127 cancelTimeoutInMinutes : 5
144128 steps :
145- - powershell : |
146- Write-Host "Stopping because commit message contains ***NO_CI***."
147- $uri = "https://dev.azure.com/microsoft/ReactNative/_apis/build/builds/$(Build.BuildId)?api-version=5.1"
148- $json = @{status="Cancelling"} | ConvertTo-Json -Compress
149- $build = Invoke-RestMethod -Uri $uri -Method Patch -Headers @{Authorization = "Bearer $(System.AccessToken)"} -ContentType "application/json" -Body $json
150- Write-Host $build
151- Write-Host "Waiting 60 seconds for build cancellation..."
152- Start-Sleep -Seconds 60
153- displayName: Stop pipeline if latest commit message contains ***NO_CI***
154- condition: and(${{ parameters.stopOnNoCI }}, contains(variables['Build.SourceVersionMessage'], '***NO_CI***'))
155-
156129 - template : .ado/templates/checkout-full.yml@self
157130 parameters :
158- persistCredentials : false # We're going to use rnbot's git creds to publish
131+ persistCredentials : false
159132
160133 - powershell : gci env:/BUILD_*
161134 displayName : Show build information
@@ -176,7 +149,7 @@ extends:
176149 condition: ${{ parameters.performBeachballCheck }}
177150
178151 - job : RnwNpmPublish
179- displayName : React-Native-Windows Npm Build Rev Publish
152+ displayName : React-Native-Windows Npm Pack
180153 dependsOn : RnwPublishPrep
181154 pool :
182155 name : Azure-Pipelines-1ESPT-ExDShared
@@ -189,63 +162,19 @@ extends:
189162 parameters :
190163 agentImage : HostedImage
191164
192- - template : .ado/templates/configure-git.yml@self
193-
194- - pwsh : |
195- Write-Host "##vso[task.setvariable variable=SkipGitPushPublishArgs]--no-push"
196- displayName: Enable No-Publish (git)
197- condition: ${{ parameters.skipGitPush }}
198-
199- # Beachball publishes NPM packages to the "$(Pipeline.Workspace)\published-packages" folder.
200- # It pushes NPM version updates to Git depending on the SkipGitPushPublishArgs variable derived from the skipGitPush parameter.
201- - script : |
202- if exist "$(Pipeline.Workspace)\published-packages" rd /s /q "$(Pipeline.Workspace)\published-packages"
203- mkdir "$(Pipeline.Workspace)\published-packages"
204- npx beachball publish --no-publish $(SkipGitPushPublishArgs) --pack-to-path "$(Pipeline.Workspace)\published-packages" --branch origin/$(SourceBranchWithFolders) -yes --bump-deps --verbose --access public --message "applying package updates ***NO_CI***"
205- displayName: Beachball Publish
165+ - script : node .ado/scripts/npmPack.js --clean --no-color "$(Pipeline.Workspace)\published-packages"
166+ displayName : Pack npm packages
206167
207168 - script : dir /s "$(Pipeline.Workspace)\published-packages"
208169 displayName : Show created npm packages
209170
210- # Beachball reverts to local state after publish, but we want the updates it added
211- - script : git pull origin $(SourceBranchWithFolders)
212- displayName : git pull
213-
214- - script : npx @rnw-scripts/create-github-releases --yes --authToken $(githubAuthToken)
215- displayName : Create GitHub Releases (New Canary Version)
216- condition : and(succeeded(), ${{ not(parameters.skipGitPush) }}, ${{ eq(variables['Build.SourceBranchName'], 'main') }} )
217-
218- - script : npx --yes @rnw-scripts/create-github-releases@latest --yes --authToken $(githubAuthToken)
219- displayName : Create GitHub Releases (New Stable Version)
220- condition : and(succeeded(), ${{ not(parameters.skipGitPush) }}, ${{ ne(variables['Build.SourceBranchName'], 'main') }} )
221-
222171 - template : .ado/templates/set-version-vars.yml@self
223172 parameters :
224173 buildEnvironment : Continuous
225174
226175 - script : echo NpmDistTag is $(NpmDistTag)
227176 displayName : Show NPM dist tag
228177
229- - script : dir /s "$(Pipeline.Workspace)\published-packages"
230- displayName : Show npm packages before ESRP release
231-
232- - task : ' SFP.release-tasks.custom-build-release-task.EsrpRelease@10'
233- displayName : ' ESRP Release to npmjs.com'
234- condition : and(succeeded(), ne(variables['NpmDistTag'], ''))
235- inputs :
236- connectedservicename : ' ESRP-CodeSigning-OGX-JSHost-RNW'
237- usemanagedidentity : false
238- keyvaultname : ' OGX-JSHost-KV'
239- authcertname : ' OGX-JSHost-Auth4'
240- signcertname : ' OGX-JSHost-Sign3'
241- clientid : ' 0a35e01f-eadf-420a-a2bf-def002ba898d'
242- domaintenantid : ' cdc5aeea-15c5-4db6-b079-fcadd2505dc2'
243- contenttype : npm
244- folderlocation : ' $(Pipeline.Workspace)\published-packages'
245- productstate : ' $(NpmDistTag)'
246- owners : ' vmorozov@microsoft.com'
247- approvers : ' khosany@microsoft.com'
248-
249178 - task : AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
250179 displayName : 📒 Generate Manifest Npm
251180 inputs :
@@ -377,17 +306,6 @@ extends:
377306
378307 - template : .ado/templates/component-governance.yml@self
379308
380- # Make symbols available through http://symweb.
381- - task : PublishSymbols@2
382- displayName : Publish symbols
383- enabled : false
384- env :
385- ARTIFACTSERVICES_SYMBOL_ACCOUNTNAME : microsoft
386- inputs :
387- SearchPattern : vnext/target/**/*.pdb
388- SymbolServerType : TeamServices
389- Pat : $(System.AccessToken)
390-
391309 templateContext :
392310 sdl :
393311 binskim :
@@ -481,11 +399,11 @@ extends:
481399 # Symbol Publishing for Work Item 59264834 - MSRC Compliance
482400 - task : PublishSymbols@2
483401 displayName : ' Publish Symbols to Microsoft Symbol Server'
484- enabled : false
402+ enabled : true
485403 condition : and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
486- env :
487- ARTIFACTSERVICES_SYMBOL_ACCOUNTNAME : microsoft
488404 inputs :
405+ UseNetCoreClientTool : true
406+ ConnectedServiceName : Office-React-Native-Windows-Bot
489407 SymbolsFolder : ' $(System.DefaultWorkingDirectory)\NugetRoot'
490408 SearchPattern : ' **/*.pdb'
491409 SymbolServerType : ' TeamServices'
@@ -494,7 +412,6 @@ extends:
494412 SymbolsArtifactName : ' ReactNativeWindows-Symbols'
495413 DetailedLog : true
496414 TreatNotIndexedAsWarning : false
497- Pat : $(System.AccessToken)
498415
499416 templateContext :
500417 sdl :
0 commit comments