-
Notifications
You must be signed in to change notification settings - Fork 9
69 lines (62 loc) · 1.76 KB
/
build.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
62
63
64
65
66
67
68
69
name: Build & Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
release:
types: ["published"]
jobs:
Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build & Test
run: make
- name: Upload artifacts
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: artifacts/
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
files: artifacts/*/*.cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Publish packages to Feedz.io
if: github.event_name == 'push'
run: make push NUGET_SOURCE=https://f.feedz.io/eiriktsarpalis/polytype/nuget/index.json NUGET_API_KEY={{ secrets.FEEDZ_IO_KEY }}
- name: Publish packages to NuGet
if: github.event_name == 'release'
run: make push NUGET_SOURCE=https://api.nuget.org/v3/index.json NUGET_API_KEY=${{ secrets.NUGET_API_KEY }}
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build & Test
run: make
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build & Test
run: make