-
Notifications
You must be signed in to change notification settings - Fork 23
ci(nuget): use Trusted Publishing auth #1578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Let maintainers know that an action is required on their side
|
CBenoit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dion-gionet Please, can you also update the publish-libraries.yaml workflow?
devolutions-gateway/.github/workflows/publish-libraries.yml
Lines 137 to 174 in 4304148
| nuget-publish: | |
| name: Publish NuGet packages | |
| environment: publish-prod | |
| if: ${{ needs.preflight.outputs.dry_run == 'false' }} | |
| needs: [preflight, nuget-merge] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download NuGet packages artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: nupkg | |
| path: nuget-packages | |
| - name: Publish to nuget.org | |
| run: | | |
| Set-PSDebug -Trace 1 | |
| $Files = Get-ChildItem -Recurse nuget-packages/*.nupkg | |
| foreach ($File in $Files) { | |
| $PushCmd = @( | |
| 'dotnet', | |
| 'nuget', | |
| 'push', | |
| "$File", | |
| '--api-key', | |
| '${{ secrets.NUGET_API_KEY }}', | |
| '--source', | |
| 'https://api.nuget.org/v3/index.json', | |
| '--skip-duplicate' | |
| ) | |
| Write-Host "Publishing $($File.Name)..." | |
| $PushCmd = $PushCmd -Join ' ' | |
| Invoke-Expression $PushCmd | |
| } | |
| shell: pwsh |
Thank you!
519d4fa to
add7b3e
Compare
add7b3e to
3820dd6
Compare
Issue: DEVOPS-3949