Skip to content

Commit d10c827

Browse files
committed
ci config
1 parent dfc25f2 commit d10c827

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: .NET
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- stable
11+
- alpha
12+
tags-ignore:
13+
- '[0-9]+.[0-9]+.[0-9]+'
14+
- '[0-9]+.[0-9]+.[0-9]+-*'
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 8.0.x
26+
- name: Restore dependencies
27+
run: dotnet restore
28+
- name: Test
29+
run: dotnet test --verbosity normal
30+
- name: Build
31+
run: dotnet build --no-restore --configuration Release
32+
- name: Create the package
33+
run: dotnet pack --no-build --configuration Release
34+
- name: Publish the package to nuget.org
35+
run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
36+
env:
37+
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ name: .NET
66
on:
77
workflow_dispatch:
88
push:
9-
branches: [ "master" ]
10-
tags: ['*']
11-
9+
tags:
10+
- '[0-9]+.[0-9]+.[0-9]+'
11+
- '[0-9]+.[0-9]+.[0-9]+-*'
1212
jobs:
13-
build:
13+
build-and-publish:
1414

1515
runs-on: ubuntu-latest
1616

0 commit comments

Comments
 (0)