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

build: publish source along with nuget package #63

Merged
merged 1 commit into from
Sep 12, 2024
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
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,31 @@ jobs:
echo "FILE_VERSION=${{ steps.gitversion.outputs.AssemblySemVer }}" >> $env:GITHUB_ENV
echo "INFORMATIONAL_VERSION=${{ steps.gitversion.outputs.InformationalVersion }}" >> $env:GITHUB_ENV

- name: Build NuGet package
- name: Build NuGet package with symbols
run: |
dotnet pack ./src/RxDBDotNet/RxDBDotNet.csproj `
--configuration Release `
--output ./nuget `
/p:Version=$env:NUGET_VERSION `
/p:AssemblyVersion=$env:ASSEMBLY_VERSION `
/p:FileVersion=$env:FILE_VERSION `
/p:InformationalVersion=$env:INFORMATIONAL_VERSION
/p:InformationalVersion=$env:INFORMATIONAL_VERSION `
/p:IncludeSource=true `
/p:IncludeSymbols=true `
/p:SymbolPackageFormat=snupkg

- name: Publish NuGet package to NuGet.org
run: |
$package = Get-ChildItem -Path ./nuget -Filter RxDBDotNet*.nupkg | Select-Object -First 1
dotnet nuget push $package.FullName --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

- name: Publish symbols package to NuGet.org
run: |
$symbolsPackage = Get-ChildItem -Path ./nuget -Filter RxDBDotNet*.snupkg | Select-Object -First 1
dotnet nuget push $symbolsPackage.FullName --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

- name: Display Package Info
run: |
echo "Package file:"
echo "Package files:"
Get-ChildItem -Path ./nuget -Filter RxDBDotNet*.nupkg | Format-Table Name, FullName
Get-ChildItem -Path ./nuget -Filter RxDBDotNet*.snupkg | Format-Table Name, FullName
Loading