Skip to content

Commit 74308b8

Browse files
gavinbarronCopilot
andauthored
ci(publishing): replace direct NuGet push with ESRP release (#3189)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2 parents b6530c6 + dcdd8bc commit 74308b8

1 file changed

Lines changed: 28 additions & 12 deletions

File tree

‎.azure-pipelines/ci-build.yml‎

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pr: none
1212

1313
variables:
1414
BuildConfiguration: 'release'
15+
NuGetOrganizationName: 'microsoftgraph'
1516
resources:
1617
repositories:
1718
- repository: 1ESPipelineTemplates
@@ -301,11 +302,6 @@ extends:
301302
runOnce:
302303
deploy:
303304
steps:
304-
- task: NuGetToolInstaller@1
305-
displayName: 'Use NuGet >=5.2.0'
306-
inputs:
307-
versionSpec: '>=5.2.0'
308-
checkLatest: true
309305
- task: PowerShell@2
310306
displayName: 'Get Latest Commit SHA from repo'
311307
inputs:
@@ -320,14 +316,34 @@ extends:
320316
filePath: $(Pipeline.Workspace)\scripts\GetNugetPackageVersion.ps1
321317
pwsh: true
322318
arguments: '-packageDirPath "$(Pipeline.Workspace)/"'
323-
- task: 1ES.PublishNuget@1
324-
displayName: 'Push release to NuGet.org'
319+
- task: CopyFiles@2
320+
displayName: 'Stage NuGet packages for ESRP release'
321+
inputs:
322+
SourceFolder: '$(Pipeline.Workspace)'
323+
Contents: |
324+
Microsoft.Graph.*.nupkg
325+
Microsoft.Graph.*.snupkg
326+
TargetFolder: '$(Pipeline.Workspace)\nuget-packages\$(NuGetOrganizationName)'
327+
- task: EsrpRelease@14
328+
displayName: 'ESRP Release - NuGet'
325329
inputs:
326-
command: push
327-
packageParentPath: '$(Pipeline.Workspace)'
328-
packagesToPush: '$(Pipeline.Workspace)\Microsoft.Graph.*.nupkg'
329-
nuGetFeedType: external
330-
publishFeedCredentials: 'microsoftgraph NuGet connection'
330+
connectedservicename: 'Federated DevX ESRP Managed Identity Connection'
331+
usemanagedidentity: false
332+
keyvaultname: 'akv-prod-eastus'
333+
authcertname: 'ReferenceLibraryPrivateCert'
334+
signcertname: 'ReferencePackagePublisherCertificate'
335+
clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8'
336+
intent: 'packagedistribution'
337+
contenttype: 'NuGet'
338+
organizationname: '$(NuGetOrganizationName)'
339+
contentsource: 'Folder'
340+
folderlocation: '$(Pipeline.Workspace)\nuget-packages\$(NuGetOrganizationName)'
341+
waitforreleasecompletion: true
342+
owners: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com'
343+
approvers: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com'
344+
serviceendpointurl: 'https://api.esrp.microsoft.com/'
345+
mainpublisher: 'ESRPRELPACMAN'
346+
domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2'
331347
- task: GitHubRelease@1
332348
displayName: 'GitHub release (Upload Artifacts)'
333349
inputs:

0 commit comments

Comments
 (0)