diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3996dc2..593e74f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,7 @@ on: permissions: contents: write # important for release description edit and asset upload + packages: write jobs: build: @@ -34,12 +35,12 @@ jobs: - name: Test run: dotnet test -c Release --no-build --verbosity normal - - - name: Upload the package to this release - run: gh release upload ${{ github.ref_name }} MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg - name: Publish the package to nuget.org run: dotnet nuget push MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json - name: Publish the package to github.com run: dotnet nuget push MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg -k ${{ env.GH_TOKEN }} -s https://nuget.pkg.github.com/bigbang1112/index.json + + - name: Upload the package to this release + run: gh release upload ${{ github.ref_name }} MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg