Skip to content

Commit 144830c

Browse files
authored
Switch NuGet publish to use Trusted Publishing rather than an API Key (#443)
1 parent e48fb0a commit 144830c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,14 @@ jobs:
5353
- name: Pack
5454
run: dotnet pack -p:VersionPrefix="${{ needs.version.outputs.version_3 }}" --version-suffix "${{ needs.version.outputs.version_suffix }}"
5555

56+
- name: NuGet login
57+
uses: NuGet/login@v1
58+
id: login
59+
with:
60+
user: ${{ secrets.NUGET_USER }}
61+
5662
- name: Publish
57-
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json
63+
run: dotnet nuget push "*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
5864
working-directory: .nupkgs
5965

6066
- name: Upload artifact to action

0 commit comments

Comments
 (0)