Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish NuGet Packages Automatically #4576

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
7 changes: 2 additions & 5 deletions docs/Release.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ This table describes all officially supported MsQuic releases.
- The tag should be the full version number: `vX.Y.Z`
- The release title should be `MsQuic vX.Y.Z`
- Put relavent information in the notes of the release (see previous releases for examples)
1. Wait for [msquic-Official](https://mscodehub.visualstudio.com/msquic/_build?definitionId=1738&_a=summary) pipeline to run for the newly created tag.
1. Download the signed Windows NuGet packages (under `drop_package_windows_nuget`) and upload them to [NuGet](https://www.nuget.org/packages/manage/upload):
- Microsoft.Native.Quic.MsQuic.OpenSSL.X.Y.Z.BUILD.nupkg
- Microsoft.Native.Quic.MsQuic.Schannel.X.Y.Z.BUILD.nupkg
- Use https://raw.githubusercontent.com/microsoft/msquic/vX.Y.Z/README.md as package description URL.
1. Wait for [msquic-Official-Tests](https://mscodehub.visualstudio.com/msquic/_build?definitionId=1824&_a=summary) pipeline to run for the newly created tag.
1. Download the `distribution` packages from the artifacts and upload them to the GitHub release:
- msquic_gamecore_console_x64_Release_schannel.zip
Expand All @@ -97,6 +92,8 @@ This table describes all officially supported MsQuic releases.
- Run `cargo publish` from the `release/X.Y` branch.
1. Update (via PR) `main` branch's `test-down-level.yml` to point the newly uploaded `*_test.zip` release binaries.

> **Note** - NuGet packages are automatically published to nuget.org by the pipeline.

### Publishing Linux packages to packages.microsoft.com (PMC)

The publishing [pipeline](https://mscodehub.visualstudio.com/msquic/_build?definitionId=2068) automatically uploads packages into PMC when a tag is created.
Expand Down
Loading