Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 9 additions & 4 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ jobs:
with:
dotnet-version: '9.0.x' # adjust based on your project

- name: Extract version from tag
id: vars
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash

- name: Restore dependencies
run: dotnet restore
run: dotnet restore src/FluentSortingDotNet

- name: Build project
run: dotnet build --configuration Release --no-restore
run: dotnet build src/FluentSortingDotNet --configuration Release --no-restore

- name: Pack NuGet package
run: dotnet pack --configuration Release --no-build --output ./nupkg
run: dotnet pack src/FluentSortingDotNet --configuration Release --no-build --output ./nupkg /p:PackageVersion=${{ steps.vars.outputs.version }}

- name: Push package to NuGet
run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push "./nupkg/FluentSortingDotNet.${{ steps.vars.outputs.version }}.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
2 changes: 1 addition & 1 deletion src/FluentSortingDotNet/FluentSortingDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Title>FluentSorting.NET</Title>
<Authors>Scantalk ApS, simo026q</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Version>1.1.0</Version>
<Version Condition="'$(PackageVersion)' == ''">0.0.0-dev</Version>
<NeutralLanguage>en</NeutralLanguage>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<Copyright>© 2024 simo026q</Copyright>
Expand Down
Loading