Skip to content

Commit 9360dd8

Browse files
committed
Add actions
1 parent d2e2f35 commit 9360dd8

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 15
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Build
16+
run: dotnet build --configuration Release
17+
- name: Test
18+
run: dotnet test --configuration Release --no-build

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- name: Set VERSION
14+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
15+
- name: Build
16+
run: dotnet build --configuration Release /p:Version=${VERSION}
17+
#- name: Test
18+
# run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
19+
- name: Pack
20+
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
21+
- name: Push
22+
run: dotnet nuget push *.nupkg --api-key ${NUGET_KEY}
23+
env:
24+
NUGET_KEY: ${{ secrets.NUGET_KEY }}

demo/DemoServer/DemoServer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
55
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
6+
<IsPackable>false</IsPackable>
67
</PropertyGroup>
78

89
<ItemGroup>

0 commit comments

Comments
 (0)