Skip to content

Commit 793760f

Browse files
committed
Add GH workflow
1 parent 1dc76db commit 793760f

File tree

5 files changed

+71
-0
lines changed

5 files changed

+71
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: 8.0.*
19+
- name: Restore dependencies
20+
run: dotnet restore
21+
- name: Build
22+
run: dotnet build --no-restore -warnaserror
23+
- name: Test
24+
run: dotnet test --no-build --verbosity normal
25+
- name: Pack
26+
run: dotnet pack -c Release

.github/workflows/pack.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Pack
2+
on:
3+
push:
4+
branches: [ main ]
5+
jobs:
6+
pack:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Setup .NET
12+
uses: actions/setup-dotnet@v1
13+
with:
14+
dotnet-version: 8.0.*
15+
- name: Pack
16+
run: dotnet pack -c Release
17+
- name: Upload package
18+
uses: actions/upload-artifact@v4
19+
with:
20+
name: NuGet packages
21+
path: artifacts/package/release/*.nupkg

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
name: publish
3+
on:
4+
push:
5+
branches: [ release ]
6+
release:
7+
types: [ published ]
8+
9+
jobs:
10+
pack:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: 8.0.*
19+
- name: Pack
20+
run: dotnet pack -c Release
21+
- name: Publish package
22+
run: dotnet nuget push --skip-duplicate -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json artifacts/package/release/*.nupkg

bench/bench.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFramework>net9.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<IsPackable>false</IsPackable>
89
</PropertyGroup>
910

1011
<ItemGroup>

src/Serde.MsgPack.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<PackageVersion>0.1.0-preview1</PackageVersion>
78
</PropertyGroup>
89

910
<ItemGroup>

0 commit comments

Comments
 (0)