diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 2257a0c..c966940 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,14 +25,14 @@ jobs: - name: tag id: tag run: | - version="$(gh release view -q .name --json tagName)" + version="$(gh release view -q .tagName --json tagName)" echo 'VERSION='$version >> $GITHUB_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build - run: dotnet build --no-restore --configuration Release /p:Version=$VERSION Sharpcaster/Sharpcaster.csproj + run: dotnet build --no-restore --configuration Release /p:Version=${{ env.VERSION }} Sharpcaster/Sharpcaster.csproj - name: Package - run: dotnet pack --configuration Release /p:Version=$VERSION /p:NuspecFile=../SharpCaster.nuspec Sharpcaster/Sharpcaster.csproj + run: dotnet pack --configuration Release /p:Version=${{ env.VERSION }} /p:NuspecFile=../SharpCaster.nuspec Sharpcaster/Sharpcaster.csproj - name: Push if: github.event_name == 'release' && github.event.action == 'published' run: dotnet nuget push "**/*.nupkg" -k $NUGET_AUTH_TOKEN -s nuget.org