From f421c7ba33f89403a9bc61d63637b36c0823d8ee Mon Sep 17 00:00:00 2001 From: Khan Date: Sat, 1 May 2021 18:17:31 +0200 Subject: [PATCH] Another try. :-| --- .github/workflows/dotnet.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6d8504f..b5fde31 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,11 +27,12 @@ jobs: #Source: https://dusted.codes/github-actions-for-dotnet-core-nuget-packages#drive-nuget-version-from-git-tags (ported to PowerShell for Windows runners) - name: Set Nuget package version + shell: bash run: | - $arrTag=$env:GITHUB_REF -replace "\\"," " -split " " - $VERSION=$arrTag[2] - $VERSION=$VERSION -replace "v","" - echo "PACKAGE_VERSION=$VERSION" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append + arrTag=(${GITHUB_REF//\// }) + VERSION="${arrTag[2]}" + VERSION="${VERSION//v}" + echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV - name: Build and pack run: msbuild -t:pack /restore /p:Configuration=Release /p:Version=${{ env.PACKAGE_VERSION }}