From 34a31dc786e79a574abace77260d392d92b8a80a Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:11:02 -0700 Subject: [PATCH] Update to publish pipeline (#13955) Co-authored-by: React-Native-Windows Bot <53619745+rnbot@users.noreply.github.com> --- .ado/publish.yml | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.ado/publish.yml b/.ado/publish.yml index 8ad46e3fce4..b90c151721d 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -162,8 +162,8 @@ extends: stages: - stage: RNWPublish jobs: - - job: RnwNpmPublish - displayName: React-Native-Windows Npm Build Rev Publish + - job: RnwPublishPrep + displayName: React-Native-Windows Publish Prep pool: ${{ parameters.AgentPool.Medium }} timeoutInMinutes: 120 cancelTimeoutInMinutes: 5 @@ -190,6 +190,31 @@ extends: - template: .ado/templates/run-compliance-prebuild.yml@self + - script: if not exist %USERPROFILE%\AppData\Roaming\npm (mkdir %USERPROFILE%\AppData\Roaming\npm) + displayName: Fix missing npm config + + - pwsh: | + npx beachball check --verbose 2>&1 | Tee-Object -Variable beachballOutput + $beachballErrors = $beachballOutput | Where-Object { $_ -match "ERROR: *"} + $beachballErrors | ForEach { Write-Host "##vso[task.logissue type=error]$_" } + if ( $beachballErrors.Count -gt 0) { throw "Beachball check found $($beachballErrors.Count) errors." } + displayName: Beachball Check + condition: ${{ parameters.performBeachballCheck }} + + - job: RnwNpmPublish + displayName: React-Native-Windows Npm Build Rev Publish + dependsOn: RnwPublishPrep + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: windows-latest + os: windows + timeoutInMinutes: 120 + cancelTimeoutInMinutes: 5 + steps: + - template: .ado/templates/prepare-js-env.yml@self + parameters: + agentImage: HostedImage + - template: .ado/templates/configure-git.yml@self - script: | @@ -202,17 +227,6 @@ extends: displayName: Enable No-Publish condition: ${{ parameters.skipGitPush }} - - script: if not exist %USERPROFILE%\AppData\Roaming\npm (mkdir %USERPROFILE%\AppData\Roaming\npm) - displayName: Fix missing npm config - - - pwsh: | - npx beachball check --verbose 2>&1 | Tee-Object -Variable beachballOutput - $beachballErrors = $beachballOutput | Where-Object { $_ -match "ERROR: *"} - $beachballErrors | ForEach { Write-Host "##vso[task.logissue type=error]$_" } - if ( $beachballErrors.Count -gt 0) { throw "Beachball check found $($beachballErrors.Count) errors." } - displayName: Beachball Check - condition: ${{ parameters.performBeachballCheck }} - - script: npx beachball publish $(SkipNpmPublishArgs) $(SkipGitPushPublishArgs) --branch origin/$(Build.SourceBranchName) -n $(npmAuthToken) -yes --bump-deps --verbose --access public --message "applying package updates ***NO_CI***" displayName: Beachball Publish @@ -532,4 +546,4 @@ extends: - output: pipelineArtifact displayName: 'Publish final nuget artifacts' targetPath: $(System.DefaultWorkingDirectory)\NugetRootFinal - artifactName: "ReactWindows-final-nuget" + artifactName: "ReactWindows-final-nuget" \ No newline at end of file