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
27 changes: 9 additions & 18 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Publish NuGet Package

on:
push:
tags:
- 'v*.*.*'
branches:
- main

jobs:
publish:
Expand All @@ -16,25 +16,16 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x

- name: Extract version from tag
id: get_version
run: echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore KSFramework.sln
run: dotnet restore

- name: Build
run: dotnet build KSFramework.sln --configuration Release --no-restore
run: dotnet build --configuration Release --no-restore

- name: Pack NuGet
run: dotnet pack src/KSFramework/KSFramework.csproj \
--configuration Release \
-p:PackageVersion=${{ env.PACKAGE_VERSION }} \
--no-build -o out
- name: Pack NuGetz
run: dotnet pack --configuration Release --no-build -o out

- name: Push to NuGet
run: dotnet nuget push out/*.nupkg \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json
run: dotnet nuget push out/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
1 change: 1 addition & 0 deletions src/KSFramework/KSFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<PropertyGroup>
<PackageId>KSFramework</PackageId>
<Version>1.4.8</Version>
<Authors>Kamran Sadin</Authors>
<Company>Sadin</Company>
<CopyRight>Copyright (c) 2022 SadinCo.</CopyRight>
Expand Down