diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd6e8be..0979799 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,9 @@ jobs: - name: Pack nuget if: success() run: | - $NugetVersion = git describe --tags --abbrev=1 | sed 's/-/./' - dotnet pack -c Release --no-build -v minimal -o ${{ env.NuGetDirectory }} -p:PackageVersion=$NugetVersion + set +x + $NUGET_VERSION=$(git describe --tags --abbrev=1 | sed 's/-/./') + dotnet pack -c Release --no-build -v minimal -o ${{ env.NuGetDirectory }} -p:PackageVersion=$NUGET_VERSION - name: Publish NuGet package if: success() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) run: dotnet nuget push "${{ env.NuGetDirectory }}\*.nupkg" --api-key "${{ secrets.NUGET_PUSH }}" --source https://api.nuget.org/v3/index.json --skip-duplicate