-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (30 loc) · 960 Bytes
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release
on:
release:
types: [created]
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Checkout
uses: actions/checkout@v4
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --configuration Release --logger trx --results-directory ./test-results/
- name: Package
run: dotnet pack --no-build --configuration Release --output ./build-output/
- name: Upload nuget package artifacts
uses: actions/upload-artifact@v4
with:
name: Nuget Packages
path: ./build-output/
- name: Publish
run: dotnet nuget push "./build-output/*.nupkg" --source nuget.org --api-key ${{ secrets.NUGET_TOKEN }}