From 728e4bc79ab616129f207a53dfc8f5f701f39bd2 Mon Sep 17 00:00:00 2001 From: Vladimir Morozov Date: Wed, 18 Nov 2026 16:11:30 -0800 Subject: [PATCH 1/3] Update LibNode to 26.1.2 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 7ec387bd..22cdd71a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ - + From 19891ff1709d39bdb40c9a3b5ec3447270070e34 Mon Sep 17 00:00:00 2001 From: Vladimir Morozov Date: Wed, 18 Nov 2026 16:11:31 -0800 Subject: [PATCH 2/3] Publish release packages and symbols only for main CI runs The Release pipeline now evaluates the CI run it consumes, as v8-jsi does: it publishes only when that run built refs/heads/main, and otherwise renames the run "Skipped - ..." and skips publishing. The Release pipeline's own branch is not a condition. CI no longer uploads symbols. It stages the same PDBs as a published-symbols pipeline artifact, and the gated Release stage lists and publishes them with PublishSymbols@2. --- .ado/publish.yml | 17 +++++----- .ado/release.yml | 80 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 10 deletions(-) diff --git a/.ado/publish.yml b/.ado/publish.yml index 255a51ef..daae8bbe 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -377,6 +377,9 @@ extends: pathtoPublish: $(Build.ArtifactStagingDirectory) artifactName: published-packages targetPath: $(Build.StagingDirectory)/pkg + - output: pipelineArtifact + artifactName: published-symbols + targetPath: $(Build.StagingDirectory)/symbols pool: name: Azure-Pipelines-1ESPT-ExDShared @@ -493,19 +496,17 @@ extends: -Path "$(Build.SourcesDirectory)/out/bin/Release/NodeApi/aot/win-x64/publish/Microsoft.JavaScript.NodeApi.node.dll" ` -NewName "Microsoft.JavaScript.NodeApi.node" - # Make symbols available through http://symweb. - - task: PublishSymbols@2 - displayName: Publish symbols + - task: CopyFiles@2 + displayName: Stage symbols inputs: - IndexSources: false # PublishSymbols does not support GitHub sources - SymbolsFolder: $(Build.SourcesDirectory)/out/bin/Release - SearchPattern: | + SourceFolder: $(Build.SourcesDirectory)/out/bin/Release + Contents: | **/Microsoft.JavaScript.NodeApi.pdb **/win-x64/publish/Microsoft.JavaScript.NodeApi.node.pdb **/Microsoft.JavaScript.NodeApi.DotNetHost.pdb **/Microsoft.JavaScript.NodeApi.Generator.pdb - SymbolServerType: TeamServices - UseNetCoreClientTool: true + TargetFolder: $(Build.StagingDirectory)/symbols + flattenFolders: false # Do not build or publish assemblies to avoid overriding signed binaries. - script: dotnet pack --configuration Release --no-build -p:NoPublish=true diff --git a/.ado/release.yml b/.ado/release.yml index c047bea7..2d09a424 100644 --- a/.ado/release.yml +++ b/.ado/release.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# The Release pipeline to publish NPM and NuGet packages +# The Release pipeline to publish symbols and NPM and NuGet packages # to public ADO feeds and, through ESRP Release, to npmjs.com and NuGet.org. # @@ -52,9 +52,85 @@ extends: networkIsolationMode: Enforce stages: + - stage: gate + displayName: Evaluate release + jobs: + - job: evaluate + displayName: Check that the CI run is from main + steps: + - checkout: none + + # Missing or unresolved CI branches fail closed. The Release branch is logged + # only: any Release branch may publish artifacts already built by main CI. + - pwsh: | + $branch = $env:CI_SOURCE_BRANCH + $ciRunName = $env:CI_RUN_NAME + $stamp = $env:BUILD_BUILDNUMBER + Write-Host "CI run: $ciRunName (ID: $env:CI_RUN_ID)" + Write-Host "CI branch: $branch" + Write-Host "Release branch: $env:RELEASE_SOURCE_BRANCH (informational only)" + if ($branch -ceq 'refs/heads/main') { + $shouldRelease = 'True' + $buildNumber = "Release - $ciRunName - $stamp" + Write-Host "Releasing artifacts from main CI." + } else { + $shouldRelease = 'False' + $buildNumber = "Skipped - $ciRunName ($($branch -replace '^refs/heads/', '')) - $stamp" + Write-Host "Skipping: only CI runs of main are released; this one is from '$branch'. Nothing is published." + } + # Build numbers can't contain " ' / : < > \ | ? @ *, exceed 255 characters, or end with '.'. + $buildNumber = $buildNumber -replace '["''/:<>\\|?@*]', '_' + $buildNumber = $buildNumber.Substring(0, [Math]::Min(255, $buildNumber.Length)).TrimEnd('.') + Write-Host "##vso[build.updatebuildnumber]$buildNumber" + Write-Host "##vso[task.setvariable variable=shouldRelease;isOutput=true]$shouldRelease" + name: gate + displayName: Decide whether to release + env: + CI_SOURCE_BRANCH: $(resources.pipeline.microsoft_node-api-dotnet_ci.sourceBranch) + CI_RUN_NAME: $(resources.pipeline.microsoft_node-api-dotnet_ci.runName) + CI_RUN_ID: $(resources.pipeline.microsoft_node-api-dotnet_ci.runID) + RELEASE_SOURCE_BRANCH: $(Build.SourceBranch) + BUILD_BUILDNUMBER: $(Build.BuildNumber) + + - pwsh: Write-Host 'Releasing' + displayName: RELEASING - the CI run is from main + condition: eq(variables['gate.shouldRelease'], 'True') + + - pwsh: Write-Host 'Skipping' + displayName: SKIPPED - the CI run is not from main, nothing is published + condition: eq(variables['gate.shouldRelease'], 'False') + - stage: main_release - displayName: Publish packages + displayName: Publish packages and symbols + dependsOn: gate + condition: and(succeeded(), eq(dependencies.gate.outputs['evaluate.gate.shouldRelease'], 'True')) jobs: + - job: publish_symbols + displayName: Publish symbols + timeoutInMinutes: 30 + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + pipeline: microsoft_node-api-dotnet_ci + artifactName: published-symbols + targetPath: $(Pipeline.Workspace)/symbols + + steps: + - pwsh: Get-ChildItem -LiteralPath '$(Pipeline.Workspace)/symbols' -Recurse -Filter *.pdb | ForEach-Object FullName + displayName: List symbols to publish + + # Make symbols available through http://symweb. + - task: PublishSymbols@2 + displayName: Publish symbols + inputs: + IndexSources: false # PublishSymbols does not support GitHub sources + SymbolsFolder: $(Pipeline.Workspace)/symbols + SearchPattern: '**/*.pdb' + SymbolServerType: TeamServices + UseNetCoreClientTool: true + - job: nuget_ms_react_native_public_job displayName: NuGet to ADO ms/react-native-public feed templateContext: From f90b8b0169bdf73d9f7338bb63d032d6d906b763 Mon Sep 17 00:00:00 2001 From: Vladimir Morozov Date: Wed, 18 Nov 2026 16:31:06 -0800 Subject: [PATCH 3/3] Describe symbol publishing in the Release pipeline header --- .ado/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.ado/release.yml b/.ado/release.yml index 2d09a424..e768b228 100644 --- a/.ado/release.yml +++ b/.ado/release.yml @@ -1,8 +1,9 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# The Release pipeline to publish symbols and NPM and NuGet packages -# to public ADO feeds and, through ESRP Release, to npmjs.com and NuGet.org. +# The Release pipeline to publish NPM and NuGet packages +# to public ADO feeds and, through ESRP Release, to npmjs.com and NuGet.org, +# and symbols to the Microsoft symbol server. # # Runs only when microsoft.node-api-dotnet.ci completes on main (see resources