File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,16 +196,33 @@ jobs:
196196 if : github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
197197 runs-on : ubuntu-latest
198198 permissions :
199+ contents : read
199200 id-token : write
200201
201202 steps :
203+ - uses : actions/checkout@v5
204+
205+ - name : Install .NET
206+ uses : actions/setup-dotnet@v5
207+ with :
208+ dotnet-version : ${{ env.DOTNET_VERSION }}
209+
210+ - name : Build project binaries
211+ run : dotnet build -c Release
212+
213+ - name : Create CI Artifacts directory
214+ run : mkdir net_connector
215+
216+ - name : Build NuGet package
217+ run : dotnet pack -c Release --output net_connector -p:PackageVersion=${{ env.CONNECTOR_VERSION }}
218+
202219 - name : NuGet login (OIDC → temp API key)
203220 uses : NuGet/login@v1
204221 id : login
205222 with :
206223 user : ${{ secrets.NUGET_USER }}
207224
208- - name : Confirm NuGet login worked
225+ - name : Publish NuGet package
209226 shell : bash
210227 env :
211228 NUGET_API_KEY : ${{ steps.login.outputs.NUGET_API_KEY }}
@@ -216,4 +233,4 @@ jobs:
216233 fi
217234
218235 echo "NuGet Trusted Publishing login succeeded."
219- echo "Temporary API key was returned, but it was not printed."
236+ dotnet nuget push "net_connector/*.nupkg" --api- key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
You can’t perform that action at this time.
0 commit comments