File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1515 deploy :
1616 runs-on : ubuntu-latest
1717 environment : publish
18+ permissions :
19+ id-token : write
1820 steps :
1921 - uses : actions/checkout@v4
2022
@@ -42,10 +44,16 @@ jobs:
4244 run : |
4345 7z x nugets.zip -o./nugets
4446
47+ - name : NuGet login (OIDC)
48+ id : nuget-login
49+ uses : NuGet/login@v1
50+ with :
51+ user : ${{ secrets.NUGET_BOT_USERNAME }}
52+
4553 - name : Publish NuGet
4654 if : ${{ inputs.publish_nuget }}
4755 run : |
48- COMMAND="dotnet nuget push ./nugets/Devolutions.BCryptPbkdf.Net.*.nupkg --api-key ${{ secrets .NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
56+ COMMAND="dotnet nuget push ./nugets/Devolutions.BCryptPbkdf.Net.*.nupkg --api-key ${{ steps.nuget-login.outputs .NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
4957
5058 if [ '${{ inputs.publish_dry_run }}' == 'true' ]; then
5159 echo "Dry Run : True"
5563
5664 echo "Running : $COMMAND"
5765
58- if [ "${{ inputs.publish_dry_run }}" != "true" ]; then # if not dry run, actually run the command
66+ if [ "${{ inputs.publish_dry_run }}" != "true" ]; then
5967 eval "$COMMAND"
6068 fi
You can’t perform that action at this time.
0 commit comments