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 environment : publish
1717 runs-on : ubuntu-22.04
18+ permissions :
19+ id-token : write
1820
1921 steps :
2022 - uses : actions/checkout@v4
@@ -57,10 +59,16 @@ jobs:
5759 version=$(grep "version" config.txt | sed -E 's/version = "(.*)"/\1/')
5860 echo "version=$version" >> $GITHUB_OUTPUT
5961
62+ - name : NuGet login (OIDC)
63+ id : nuget-login
64+ uses : NuGet/login@v1
65+ with :
66+ user : ${{ secrets.NUGET_BOT_USERNAME }}
67+
6068 - name : Publish Core NuGet
6169 if : ${{ inputs.publish_core_nuget }}
6270 run : |
63- COMMAND="dotnet nuget push ./devolutions-crypto-nugets/Devolutions.Crypto.Core.*.nupkg --api-key ${{ secrets .NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
71+ COMMAND="dotnet nuget push ./devolutions-crypto-nugets/Devolutions.Crypto.Core.*.nupkg --api-key ${{ steps.nuget-login.outputs .NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
6472
6573 if [ '${{ inputs.publish_dry_run }}' == 'true' ]; then
6674 echo "Dry Run : True"
7078
7179 echo "Running : $COMMAND"
7280
73- if [ "${{ inputs.publish_dry_run }}" != "true" ]; then # if not dry run, actually run the command
81+ if [ "${{ inputs.publish_dry_run }}" != "true" ]; then
7482 eval "$COMMAND"
7583
7684 git tag "nuget-v${{ steps.version.outputs.version }}"
You can’t perform that action at this time.
0 commit comments