Skip to content
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

GHA: publish nuget packages to the GitHub Nuget Store #4

Merged
merged 6 commits into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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