Skip to content

Commit c7d3790

Browse files
algolia-botFluf22
andcommitted
chore(release): enable OIDC token issuance and update NuGet publish step (generated)
algolia/api-clients-automation#6087 Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
1 parent 5ff659f commit c7d3790

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
name: Publish
1111
runs-on: ubuntu-22.04
1212
if: "startsWith(github.event.head_commit.message, 'chore: release')"
13+
permissions:
14+
id-token: write # enable GitHub OIDC token issuance for this job
1315
steps:
1416
- uses: actions/checkout@v6
1517

@@ -21,5 +23,11 @@ jobs:
2123
- name: Create Nugget package
2224
run: dotnet pack --configuration Release --output nugget
2325

26+
- name: NuGet login (OIDC → temp API key)
27+
uses: NuGet/login@v1
28+
id: login
29+
with:
30+
user: ${{ secrets.NUGET_USER }}
31+
2432
- name: Publish NuGet package
25-
run: dotnet nuget push "nugget/*.nupkg" --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
33+
run: dotnet nuget push "nugget/*.nupkg" --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)