Skip to content

Commit 75dd3ad

Browse files
committed
Feat#: add build CI/CD for NuGet
1 parent 7c8d6e7 commit 75dd3ad

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 'Build and release NuGet package'
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
build-publish:
10+
name: 'Build and push NuGet'
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
IS_RELEASE: true
15+
16+
steps:
17+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
18+
19+
- name: 'Build NuGet'
20+
uses: Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-build@606ac289d701be7b7d90e5ff8647dedf57d6d755 # main
21+
with:
22+
dotnet-build-args: ${{ env.IS_RELEASE == 'true' && format('-p:Version={0} -o nupkgs', github.ref_name) || '-o nupkgs' }}
23+
dotnet-project-path: 'ApplicationLoopback.NET/ApplicationLoopback.NET/ApplicationLoopback.NET.csproj'
24+
dotnet-build-type: 'pack'
25+
26+
- name: 'Build and push NuGet'
27+
uses: Yellow-Dog-Man/composite-actions-templates/.github/actions/dotnet-build-push-nuget@606ac289d701be7b7d90e5ff8647dedf57d6d755 # main
28+
with:
29+
dotnet-nuget-auth-token: ${{ secrets.NUGET_TOKEN }}

ApplicationLoopback.NET/ApplicationLoopback.NET/ApplicationLoopback.NET.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
6+
7+
<PackageId>YellowDogMan.ApplicationLoobpack.NET</PackageId>
68
</PropertyGroup>
79

810
<ItemGroup>

0 commit comments

Comments
 (0)