File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1010 description : " Dry Run Mode"
1111 required : true
1212 type : boolean
13-
13+
1414jobs :
1515 deploy :
1616 runs-on : ubuntu-latest
1717 environment : publish
18+ permissions :
19+ id-token : write
1820 steps :
1921 - uses : actions/checkout@v4
2022
@@ -40,10 +42,16 @@ jobs:
4042 - name : Extract Artifacts
4143 run : 7z x nugets.zip -o./nugets
4244
45+ - name : NuGet login (OIDC)
46+ id : nuget-login
47+ uses : NuGet/login@v1
48+ with :
49+ user : ${{ secrets.NUGET_BOT_USERNAME }}
50+
4351 - name : Publish NuGet
4452 if : ${{ inputs.publish_nuget }}
4553 run : |
46- COMMAND="dotnet nuget push ./nugets/Devolutions.XTS.NET.*.nupkg --api-key ${{ secrets .NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
54+ COMMAND="dotnet nuget push ./nugets/Devolutions.XTS.NET.*.nupkg --api-key ${{ steps.nuget-login.outputs .NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
4755
4856 if [ '${{ inputs.publish_dry_run }}' == 'true' ]; then
4957 echo "Dry Run : True"
5361
5462 echo "Running : $COMMAND"
5563
56- if [ "${{ inputs.publish_dry_run }}" != "true" ]; then # if not dry run, actually run the command
64+ if [ "${{ inputs.publish_dry_run }}" != "true" ]; then
5765 eval "$COMMAND"
5866 fi
You can’t perform that action at this time.
0 commit comments