From 2dfda9fc0a78211cc229d261398624bc2a797d8c Mon Sep 17 00:00:00 2001 From: wherewhere Date: Thu, 23 Nov 2023 18:09:24 +0800 Subject: [PATCH] Use GITHUB_TOKEN to upload package --- .github/workflows/build-and-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 09af876b..3687c812 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -68,9 +68,10 @@ jobs: - name: Publish if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - run: dotnet nuget push nugets/**.nupkg --source $env:NUGET_SOURCE --skip-duplicate --api-key ${{ secrets.NUGET_KEY }} + run: dotnet nuget push nugets/**.nupkg --source $env:NUGET_SOURCE --skip-duplicate --api-key $env:GITHUB_TOKEN env: NUGET_SOURCE: https://nuget.pkg.github.com/SharpAdb/index.json + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload uses: actions/upload-artifact@v3