From fe8b19f21bee012d5d529577adba050a9e60b2ba Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 24 Apr 2026 12:21:14 -0700 Subject: [PATCH] fix: publish pipeline Publish stage always skipped due to boolean expression mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The condition `not(${{ parameters.skipNpmPublish }})` mixes compile-time template expansion with runtime expression evaluation. At compile time, ${{ parameters.skipNpmPublish }} expands to the YAML boolean string 'False' (capital F). In the Azure DevOps runtime expression context, 'False' is not the boolean keyword false — it is a non-empty string, which is always truthy. So not(truthy) evaluates to false, causing the Publish stage to be skipped regardless of the parameter value. Fix: use ne('${{ parameters.skipNpmPublish }}', 'true') which correctly compares the expanded string using case-insensitive string comparison. --- .ado/azure-pipelines.publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/azure-pipelines.publish.yml b/.ado/azure-pipelines.publish.yml index f462651f43..b1eedd3765 100644 --- a/.ado/azure-pipelines.publish.yml +++ b/.ado/azure-pipelines.publish.yml @@ -90,7 +90,7 @@ extends: - stage: Publish displayName: Publish to NPM dependsOn: Build - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(${{ parameters.skipNpmPublish }}), eq(stageDependencies.Build.BuildAndPack.outputs['check.hasTarballs'], 'true')) + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), ne('${{ parameters.skipNpmPublish }}', 'true'), eq(stageDependencies.Build.BuildAndPack.outputs['check.hasTarballs'], 'true')) jobs: - job: PublishPackages displayName: Publish NPM Packages