@@ -82,6 +82,8 @@ stages:
8282 releaseInfo : $[ dependencies.Version.outputs['readNewVersionStep.releaseInfo'] ]
8383 newVersion : $[ dependencies.Version.outputs['readNewVersionStep.newVersion'] ]
8484 currentVersion : $[ dependencies.Version.outputs['readCurrentVersionStep.currentVersion'] ]
85+ acceptHeader : ' Accept: application/vnd.github+json'
86+ apiVersionHeader : ' X-GitHub-Api-Version: 2022-11-28'
8587 contentTypeHeader1 : ' Content-Type: application/json'
8688 contentTypeHeader2 : ' Content-Type: application/octet-stream'
8789 authHeader : ' Authorization: Bearer $(gitHubToken)'
@@ -104,8 +106,8 @@ stages:
104106 curl -X POST -s -H '$(contentTypeHeader1)' -H '$(authHeader)' https://api.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases -d '$(createReleaseRequest)'
105107 $json = Invoke-RestMethod -Method 'GET' -Uri "https://api.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/latest"
106108 $releaseId = $json.id
107- curl -X POST -s -H '$(contentTypeHeader2)' -H '$(authHeader)' --data-binary '$(Pipeline.Workspace)/NuGetPackage/CSharpFunctionalExtensions.$(newVersion).nupkg' 'https://uploads.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/$(releaseId)/assets?name=CSharpFunctionalExtensions.$(newVersion).nupkg'
108- curl -X POST -s -H '$(contentTypeHeader2)' -H '$(authHeader)' --data-binary '$(Pipeline.Workspace)/NuGetPackageStrongName/CSharpFunctionalExtensions.StrongName.$(newVersion).nupkg' 'https://uploads.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/$(releaseId)/assets?name=CSharpFunctionalExtensions.StrongName.$(newVersion).nupkg'
109+ curl -X POST -s -H '$(acceptHeader)' -H '$(apiVersionHeader)' -H '$( contentTypeHeader2)' -H '$(authHeader)' --data-binary '@ $(Pipeline.Workspace)/NuGetPackage/CSharpFunctionalExtensions.$(newVersion).nupkg' 'https://uploads.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/$(releaseId)/assets?name=CSharpFunctionalExtensions.$(newVersion).nupkg'
110+ curl -X POST -s -H '$(acceptHeader)' -H '$(apiVersionHeader)' -H '$( contentTypeHeader2)' -H '$(authHeader)' --data-binary '@ $(Pipeline.Workspace)/NuGetPackageStrongName/CSharpFunctionalExtensions.StrongName.$(newVersion).nupkg' 'https://uploads.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/$(releaseId)/assets?name=CSharpFunctionalExtensions.StrongName.$(newVersion).nupkg'
109111 displayName: Publish to GitHub
110112 condition: and(succeeded(), ne(variables.gitHubToken, ''))
111113
0 commit comments