Skip to content

Commit 08b6a7d

Browse files
authored
chore: Use Trusted Publishing in Nuget publish (#523)
1 parent 002d297 commit 08b6a7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ jobs:
196196
permissions:
197197
contents: read
198198
issues: write
199+
id-token: write # For Trusted Publishing.
199200
steps:
200201
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
201202
with:
@@ -229,9 +230,13 @@ jobs:
229230
"${{ secrets.ARTIFACTORY_REGISTRY }}/${{ secrets.ARTIFACTORY_SIGN_TOOL }}" \
230231
/bin/bash -c "jsign --tsaurl http://timestamp.digicert.com -a ${{ secrets.AUTHENTICODE_KEY_NAME }} \
231232
./dist/dotnet/MongoDB.AWSCDKResourcesMongoDBAtlas.${{ steps.extract-version.outputs.VERSION }}.nupkg"
233+
- id: login
234+
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544
235+
with:
236+
user: ${{ secrets.NUGET_USER }}
232237
- name: Release
233238
env:
234-
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
239+
NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
235240
run: npx -p publib@latest publib-nuget
236241
- name: Create Issue
237242
if: ${{ failure() }}

0 commit comments

Comments
 (0)