diff --git a/azure/deploy.yml b/azure/deploy.yml index 4742da3c8b..8e553a7cf7 100644 --- a/azure/deploy.yml +++ b/azure/deploy.yml @@ -10,22 +10,20 @@ steps: dotnet pack "src\Discord.Net.Interactions\Discord.Net.Interactions.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag) displayName: Pack projects -- task: NuGetCommand@2 - displayName: Pack metapackage (release mode) - condition: eq(variables['buildTag'], True) - inputs: - command: 'pack' - packagesToPack: 'src/Discord.Net/Discord.Net.nuspec' - versioningScheme: 'off' +- pwsh: | + $package = Get-ChildItem $(Build.ArtifactStagingDirectory)/Discord.Net.Core*.nupkg + $version = $package.Name.Replace("Discord.Net.Core.", "").Replace(".nupkg", "") + + Write-Output "##vso[task.setvariable variable=packedVersion;]$version" + displayName: Retrieve packed version - task: NuGetCommand@2 displayName: Pack metapackage - condition: eq(variables['buildTag'], False) inputs: command: 'pack' packagesToPack: 'src/Discord.Net/Discord.Net.nuspec' versioningScheme: 'off' - buildProperties: 'suffix=-$(buildNumber)' + buildProperties: 'version=$(packedVersion)' - task: NuGetCommand@2 displayName: Push to NuGet diff --git a/src/Discord.Net/Discord.Net.nuspec b/src/Discord.Net/Discord.Net.nuspec index b208ca6be5..ba70fb1c47 100644 --- a/src/Discord.Net/Discord.Net.nuspec +++ b/src/Discord.Net/Discord.Net.nuspec @@ -2,7 +2,7 @@ Discord.Net - 3.1.0$suffix$ + $version$ Discord.Net Discord.Net Contributors foxbot @@ -14,45 +14,45 @@ https://github.com/RogueException/Discord.Net/raw/dev/docs/marketing/logo/PackageLogo.png - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - \ No newline at end of file +