diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index 1ebe64f..a3b02f3 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -33,15 +33,17 @@ jobs: - name: Build run: dotnet build --no-restore --configuration Release - + - name: Test run: dotnet test --no-build --verbosity normal --configuration Release -e telegram_test_token=${{secrets.TELEGRAM_TEST_TOKEN}} - name: Pack run: dotnet pack --no-build --configuration Release -p:PackageVersion=${{ env.PACKAGE_VERSION }} - + - name: Add GitHub source + run: dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github ${{ env.GITHUB_SOURCE }} + - name: Publish to GitHub Packages - run: dotnet nuget push "**/*.nupkg" --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github ${{ env.GITHUB_SOURCE }} + run: dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" - name: Publish to NuGet run: dotnet nuget push "**/*.nupkg" --source ${{ env.NUGET_SOURCE }} --api-key ${{ secrets.NUGET_API_KEY }}