Skip to content

Commit

Permalink
Another try. :-|
Browse files Browse the repository at this point in the history
  • Loading branch information
wokhan committed May 1, 2021
1 parent 42c712a commit f421c7b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit f421c7b

Please sign in to comment.