diff --git a/.github/workflows/dotnet.yml b/.github/workflows/publish-nugets.yml similarity index 82% rename from .github/workflows/dotnet.yml rename to .github/workflows/publish-nugets.yml index a62fb79..9475578 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/publish-nugets.yml @@ -18,6 +18,9 @@ jobs: - name: Extract Release Version id: extract_version run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV + + - name: Debug Release Version + run: echo "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" - name: Setup .NET uses: actions/setup-dotnet@v3 @@ -28,10 +31,8 @@ jobs: run: dotnet restore - name: Build and Pack NuGet Package - run: dotnet pack -c Release -o ./artifacts + run: dotnet pack -c Release -o ./artifacts -p:Version=${{ env.RELEASE_VERSION }} - name: Publish to NuGet.org run: | dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} - env: - NUGET_VERSION: ${{ steps.extract_version.outputs.release_version }}