File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 RELEASE_MODE : " Beta"
77 RUN_TESTS : " true"
88
9- permissions :
10- checks : write
11- pull-requests : write
12-
139concurrency :
1410 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1511 cancel-in-progress : true
5753 build-and-validate :
5854 name : " Build and Validate"
5955 runs-on : " windows-2025-vs2026"
56+ permissions :
57+ checks : write
58+ pull-requests : write
6059 defaults :
6160 run :
6261 shell : " pwsh"
@@ -128,6 +127,7 @@ jobs:
128127 action_fail : true
129128
130129 - name : " Publish Artifacts"
130+ id : " publish-artifacts-step"
131131 uses : " actions/upload-artifact@v7.0.0"
132132 if : ${{ !cancelled() }}
133133 with :
@@ -142,3 +142,32 @@ jobs:
142142 env :
143143 GITHUB_APP_ID : ${{ secrets.GITHUB_APP_ID }}
144144 GITHUB_APP_PRIVATE_KEY : ${{ secrets.GITHUB_APP_PRIVATE_KEY }}
145+
146+ outputs :
147+ artifact-id : ${{ steps.publish-artifacts-step.outputs.artifact-id }}
148+
149+ deploy-to-nuget :
150+ name : " Deploy to NuGet"
151+ needs : ["build-and-validate"]
152+ environment : " nuget.org"
153+ if : ${{ github.event_name == 'workflow_dispatch' }}
154+ runs-on : " ubuntu-latest"
155+ permissions :
156+ id-token : " write"
157+ defaults :
158+ run :
159+ shell : " pwsh"
160+ steps :
161+ - name : " Download Artifacts"
162+ uses : " actions/download-artifact@v8.0.1"
163+ with :
164+ artifact-ids : ${{ needs.build-and-validate.outputs.artifact-id }}
165+
166+ - name : " NuGet login (OIDC → temp API key)"
167+ uses : " NuGet/login@v1"
168+ id : " nuget-login"
169+ with :
170+ user : ${{ secrets.NUGET_USER }}
171+
172+ - name : " NuGet Push"
173+ run : " dotnet nuget push *.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
You can’t perform that action at this time.
0 commit comments