Work CI-CD
Fix condition for WIN builds so they publish to nuget only on builds from main.
***NO_CI***
@@ -855,12 +855,16 @@ jobs:
ArtifactName: deployables
ArtifactType: Container
- # push NuGet packages to Azure Artifacts feed (always happens except on PR builds)
+ # push NuGet packages to Azure Artifacts feed (always happens when building from main, except on PR builds)
- task: NuGetCommand@2
condition: >-
and(
succeeded(),
- eq(variables['System.PullRequest.PullRequestId'], '')
+ eq(variables['System.PullRequest.PullRequestId'], ''),
+ or(
+ eq(variables['ForceUpload'], true),
+ eq(variables['Build.SourceBranchName'], 'main')
+ )
)
continueOnError: true
displayName: Push NuGet packages to Azure Artifacts
@@ -871,12 +875,16 @@ jobs:
publishFeedCredentials: 'AzureArtifacts-nf-interpreter'
allowPackageConflicts: true
- # push NuGet packages to NuGet (always happens except on PR builds)
+ # push NuGet packages to NuGet (always happens when building from main, except on PR builds)
- task: NuGetCommand@2
condition: >-
and(
succeeded(),
- eq(variables['System.PullRequest.PullRequestId'], '')
+ eq(variables['System.PullRequest.PullRequestId'], ''),
+ or(
+ eq(variables['ForceUpload'], true),
+ eq(variables['Build.SourceBranchName'], 'main')
+ )
)
continueOnError: true
displayName: Push NuGet packages to NuGet
@@ -1013,12 +1021,16 @@ jobs:
ArtifactName: deployables
ArtifactType: Container
- # push NuGet packages to Azure Artifacts feed (always happens except on PR builds)
+ # push NuGet packages to Azure Artifacts feed (always happens when building from main, except on PR builds)
- task: NuGetCommand@2
condition: >-
and(
succeeded(),
- eq(variables['System.PullRequest.PullRequestId'], '')
+ eq(variables['System.PullRequest.PullRequestId'], ''),
+ or(
+ eq(variables['ForceUpload'], true),
+ eq(variables['Build.SourceBranchName'], 'main')
+ )
)
continueOnError: true
displayName: Push NuGet packages to Azure Artifacts
@@ -1029,12 +1041,16 @@ jobs:
publishFeedCredentials: 'AzureArtifacts-nf-interpreter'
allowPackageConflicts: true
- # push NuGet packages to NuGet (always happens except on PR builds)
+ # push NuGet packages to NuGet (always happens when building from main, except on PR builds)
- task: NuGetCommand@2
condition: >-
and(
succeeded(),
- eq(variables['System.PullRequest.PullRequestId'], '')
+ eq(variables['System.PullRequest.PullRequestId'], ''),
+ or(
+ eq(variables['ForceUpload'], true),
+ eq(variables['Build.SourceBranchName'], 'main')
+ )
)
continueOnError: true
displayName: Push NuGet packages to NuGet
