Skip to content

Commit f5960e7

Browse files
feat(actions): add nuget trusted publishing (#6788)
* feat(actions): add nuget trusted publishing * chore: add actions sulotion folder * chore: update nuget-login to login --------- Co-Authored-By: Michel Oliveira <[email protected]> Co-authored-by: Argo Zhang <[email protected]>
1 parent d325482 commit f5960e7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/pack.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
jobs:
1111
pack:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
15+
contents: read
1316

1417
steps:
1518
- uses: actions/checkout@v4
@@ -19,9 +22,15 @@ jobs:
1922
with:
2023
dotnet-version: 9.0.x
2124

25+
- name: NuGet login
26+
uses: NuGet/login@v1
27+
id: login
28+
with:
29+
user: ${{ secrets.NUGET_USER }}
30+
2231
- name: Publish to Nuget
2332
env:
24-
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
33+
NUGET_API_KEY: ${{steps.login.outputs.NUGET_API_KEY}}
2534
Bundle: True
2635

2736
run: |

BootstrapBlazor.slnx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<Solution>
2+
<Folder Name="/actions/">
3+
<File Path=".github/workflows/auto-pull-request-checks.yml" />
4+
<File Path=".github/workflows/build.yml" />
5+
<File Path=".github/workflows/docker.yml" />
6+
<File Path=".github/workflows/pack.yml" />
7+
<File Path=".github/workflows/publish.yml" />
8+
</Folder>
29
<Folder Name="/configuration/">
310
<File Path=".editorconfig" />
411
<File Path=".gitignore" />

0 commit comments

Comments
 (0)