File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 4848 runs-on : ubuntu-latest
4949 environment : publish
5050 if : needs.detect-project.outputs.project != ''
51-
51+ permissions :
52+ id-token : write # enable GitHub OIDC token issuance for this job
5253 steps :
5354 - name : Checkout code
5455 uses : actions/checkout@v4
6566 key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
6667 restore-keys : |
6768 ${{ runner.os }}-nuget-
69+ # Get a short-lived NuGet API key
70+
71+ - name : NuGet login (OIDC → temp API key)
72+ uses : NuGet/login@v1
73+ id : login
74+ with :
75+ user : ${{ secrets.NUGET_USER }}
6876
6977 - name : Build and publish project
7078 uses : cake-build/cake-action@v3
7381 script-path : build.cake
7482 arguments : --project="${{ needs.detect-project.outputs.project }}" --configuration=Release
7583 env :
76- NUGET_API_KEY : ${{ secrets. NUGET_API_KEY }}
84+ NUGET_API_KEY : ${{steps.login.outputs. NUGET_API_KEY}}
7785
7886 - name : Upload packages as artifacts
7987 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 2222 <GenerateAssemblyInfo >true</GenerateAssemblyInfo >
2323 <Deterministic >true</Deterministic >
2424 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
25- <Version >1.0.1 </Version >
25+ <Version >1.0.2 </Version >
2626 </PropertyGroup >
2727
2828 <ItemGroup >
You can’t perform that action at this time.
0 commit comments