From b55084d50da902ce60b0ad383a325090d4e82d3a Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Tue, 14 Apr 2020 17:16:02 +0800 Subject: [PATCH] nugetUpload: fix version creation Somehow for the previous commit hash, which had only numbers in its short version (0122072), nuget failed with: Run $date = get-date -format "yyyyMMdd-HHmm" Attempting to build package from 'TgSharp.Core.csproj'. Error NU5010: Version string specified for package reference '0.1.0-date.20200414-0908.git.0122072' is invalid. File does not exist (TgSharp.0.1.0-date.20200414-0908.git.0122072.nupkg). Now we remove the "." after "date" and "git" and use double-dash to separate initial version from the sub-version. --- .github/workflows/nugetUpload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nugetUpload.yml b/.github/workflows/nugetUpload.yml index e971165..cb6cea5 100644 --- a/.github/workflows/nugetUpload.yml +++ b/.github/workflows/nugetUpload.yml @@ -29,7 +29,7 @@ jobs: } Else { $baseVersion = "0.1.0" - $version = "$baseVersion-date.$date.git.$hash" + $version = "$baseVersion--date$date.git$hash" } ./Nuget.exe pack src/TgSharp.Core/TgSharp.Core.csproj -Version $version -Build -Properties Configuration=Release