Skip to content

Commit 6303bab

Browse files
authored
Merge pull request #15 from Mimeo/advanced-filter-fixes
Use trusted nuget publishing
2 parents 8e7a7db + f71c7e2 commit 6303bab

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ jobs:
8181
publish-nuget:
8282
needs: build
8383
runs-on: ubuntu-latest
84+
permissions:
85+
id-token: write # enable GitHub OIDC token issuance for this job
8486

8587
# Only run for main branch
8688
if: github.ref == 'refs/heads/main'
@@ -98,7 +100,11 @@ jobs:
98100
name: nuget
99101
path: nuget
100102

103+
- name: NuGet login (OIDC → temp API key)
104+
uses: NuGet/login@v1
105+
id: login
106+
with:
107+
user: ${{ secrets.NUGET_USER }}
108+
101109
- name: Upload Packages
102-
env:
103-
NUGET_API_KEY: ${{ secrets.NUGET_MIMEO_PUBLISH_KEY }}
104-
run: dotnet nuget push ./nuget/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key $NUGET_API_KEY
110+
run: dotnet nuget push ./nuget/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{steps.login.outputs.NUGET_API_KEY}}

0 commit comments

Comments
 (0)