Skip to content

Commit

Permalink
GHA: publish nuget packages to the GitHub Nuget Store
Browse files Browse the repository at this point in the history
This pushes the new nuget packages to the nuget source to ease the
distribution for our builds.
  • Loading branch information
compnerd authored Dec 5, 2023
1 parent 9d9fbcd commit c97a11f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/bcny-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,21 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: windows-${{ matrix.arch }}.nupkg
path: io.sentry.sentry-native.win.*.0.0.0-*.nupkg
path: io.sentry.sentry-native.win.crashpad.*.nupkg

- name: Publish NuGet Packages
env:
NUGET_SOURCE_NAME: TheBrowserCompany
NUGET_SOURCE_URL: https://nuget.pkg.github.com/thebrowsercompany/index.json
NUGET_SOURCE_USERNAME: thebrowsercompany-bot2
NUGET_SOURCE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }}
run: |
if ((nuget sources List | Select-String "${env:NUGET_SOURCE_NAME}").Count -gt 0) {
nuget sources Remove -Name "${env:NUGET_SOURCE_NAME}"
}
nuget sources Add -Name ${env:NUGET_SOURCE_NAME} -Source ${env:NUGET_SOURCE_URL} -Username ${env:NUGET_SOURCE_USERNAME} -Password ${env:NUGET_SOURCE_PASSWORD} -StorePasswordInClearText
nuget setApiKey ${env:NUGET_API_KEY} -Source ${env:NUGET_SOURCE_URL}
$pkgs = Get-ChildItem -Path io.sentry.sentry-native.win.crashpad.*.nupkg
nuget push $pkgs[0].Name -Source ${env:NUGET_SOURCE_URL} -SkipDuplicate
shell: pwsh

0 comments on commit c97a11f

Please sign in to comment.