Skip to content

Commit 24ce725

Browse files
committed
Add github actions config
1 parent 53fcffa commit 24ce725

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
DOTNET_NOLOGO: 1
11+
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-dotnet@v4
19+
name: Install Current .NET SDK
20+
- name: Restore dependencies
21+
run: dotnet restore /p:TreatWarningsAsErrors=true
22+
- name: Build
23+
run: dotnet build --configuration Release --no-restore /p:TreatWarningsAsErrors=true
24+
25+
nupkg:
26+
name: Package
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-dotnet@v4
31+
name: Install Current .NET SDK
32+
- name: Generate NuGet Packages
33+
run: dotnet pack --configuration Release --output nupkg /p:TreatWarningsAsErrors=true
34+
- uses: actions/upload-artifact@v4
35+
if: success() && github.ref == 'refs/heads/main'
36+
with:
37+
name: nupkg
38+
path: nupkg/*
39+
retention-days: 1

0 commit comments

Comments
 (0)