Skip to content

Commit 591145f

Browse files
h3rmanjloekensgard
authored andcommitted
ci: use trusted publishing
1 parent 0cd37d4 commit 591145f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/publish.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v5
1414

1515
- name: Setup .NET 9
16-
uses: actions/setup-dotnet@v4
16+
uses: actions/setup-dotnet@v5
1717
with:
1818
dotnet-version: 9.0.*
1919

@@ -37,5 +37,12 @@ jobs:
3737
- name: Pack .NET project
3838
run: dotnet pack Intility.Logging.sln -o Intility.Logging/output --property:Version=${{ steps.meta.outputs.tags }}
3939

40+
# Get a short-lived NuGet API key
41+
- name: NuGet login
42+
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1.1.0
43+
id: login
44+
with:
45+
user: ${{ secrets.NUGET_USER }}
46+
4047
- name: Publish to NuGet
41-
run: dotnet nuget push Intility.Logging/output/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
48+
run: dotnet nuget push Intility.Logging/output/*.nupkg --skip-duplicate --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)