From b6e4b0ee98149eb946ac2fe46fa3590508f35212 Mon Sep 17 00:00:00 2001 From: luzhan <513964121@qq.com> Date: Wed, 10 Jul 2024 22:29:17 +0800 Subject: [PATCH] feat: add publish to github package --- .github/workflows/publish.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2b7627f..243073b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: .NET Release to NuGet +name: Release to NuGet and GitHub Packages on: release: @@ -32,3 +32,8 @@ jobs: dotnet nuget push "nupkgs/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + + - name: Publish Packages to GitHub Packages + run: dotnet nuget push "nupkgs/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}