Skip to content

Commit

Permalink
CP Automatic Nuget Publishing (#4583)
Browse files Browse the repository at this point in the history
* Publish NuGet Packages Automatically (#4576)

* Fix typo from #4576 (#4582)
  • Loading branch information
nibanks committed Sep 30, 2024
1 parent cdf3c6a commit 66b5500
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .azure/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ extends:
- build_uwp
jobs:
- template: .azure/obtemplates/build-nuget.yml@self
# Publish official Nuget packages for tags
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
parameters:
release: true
publish: true
# Publish prerelease Nuget packages for main branch builds
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
parameters:
publish: true
10 changes: 10 additions & 0 deletions .azure/obtemplates/build-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

parameters:
release: false
publish: false

jobs:
- job: nuget
Expand Down Expand Up @@ -92,3 +93,12 @@ jobs:
signing_profile: 'external_distribution'
files_to_sign: '**/*.nupkg'
search_root: '$(ob_outputDirectory)'

- ${{ if eq(parameters.publish, true) }}:
- task: NuGetCommand@2
displayName: 'Publish to Nuget.org'
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: 'MsQuic Nuget Publish'
packagesToPush: '$(ob_outputDirectory)/**/*.nupkg'

0 comments on commit 66b5500

Please sign in to comment.