Skip to content

Commit d5a458a

Browse files
committed
backport release workflow
1 parent d58b564 commit d5a458a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: release
22
on:
33
push:
44
tags: ["*.*.*"]
5-
permissions: read-all
5+
workflow_dispatch:
6+
permissions:
7+
id-token: write
68
env:
79
DOTNET_NOLOGO: true
810
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -17,10 +19,12 @@ jobs:
1719
- uses: actions/checkout@v6.0.1
1820
with:
1921
persist-credentials: false
20-
- run: dotnet build --configuration Release --nologo
22+
- run: ./build pack
23+
- uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1
24+
id: nuget-login
25+
with:
26+
user: ${{ secrets.NUGET_USER }}
2127
- name: push
2228
env:
23-
SOURCE: ${{ secrets.NUGET_PUSH_SOURCE }}
24-
API_KEY: ${{ secrets.NUGET_PUSH_API_KEY }}
25-
if: env.SOURCE != '' || env.API_KEY != ''
26-
run: dotnet nuget push ./**/*.nupkg --source "$SOURCE" --api-key "$API_KEY"
29+
API_KEY: ${{steps.nuget-login.outputs.NUGET_API_KEY}}
30+
run: dotnet nuget push ./**/Release/*.nupkg --api-key "$API_KEY" --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)