-
Notifications
You must be signed in to change notification settings - Fork 26
61 lines (59 loc) · 1.61 KB
/
dotnet.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: .NET
on:
push:
tags:
- '*'
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: softprops/[email protected]
with:
name: ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: false
build:
name: Build Release
needs: create_release
strategy:
matrix:
kind: ['linux', 'windows', 'macOS']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
- kind: windows
os: windows-latest
target: win-x64
- kind: macOS
os: macos-latest
target: osx-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet publish -c Release -r ${{ matrix.target }} --self-contained -f net8.0
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
directory: ${{ github.workspace }}/bin/Release/net8.0/${{ matrix.target }}/publish
type: 'zip'
filename: ${{ github.workspace }}/Release-${{ matrix.target }}.zip
- name: Release
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/Release-${{ matrix.target }}.zip