forked from eiriktsarpalis/PolyType
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (61 loc) · 2.33 KB
/
build.yml
File metadata and controls
76 lines (61 loc) · 2.33 KB
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
70
71
72
73
74
75
76
name: Build and Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
configuration: [Debug, Release]
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET 🤖
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
10.0.x
9.0.x
# Netfx testing on non-Windows OSes requires mono
- name: Setup Mono 🙈
if: runner.os == 'Linux'
run: sudo apt-get install -y mono-devel
- name: Setup Mono on macOS 🙈
if: runner.os == 'macOS'
run: brew install mono
- name: Build 🏗️
run: make build CONFIGURATION=${{ matrix.configuration }}
- name: Test 🧪
run: make test CONFIGURATION=${{ matrix.configuration }}
env:
VSTEST_CONNECTION_TIMEOUT: 1800000
- name: Pack 📦
if: matrix.configuration == 'Release'
run: make pack CONFIGURATION=${{ matrix.configuration }}
- name: Generate docs 📚
if: matrix.configuration == 'Release'
run: make generate-docs CONFIGURATION=${{ matrix.configuration }}
- name: Upload artifacts 🚀
if: runner.os == 'Linux' && matrix.configuration == 'Release' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v6
with:
name: build-artifacts
path: artifacts/
- name: Upload to Codecov 📊
uses: codecov/codecov-action@v5
if: runner.os == 'Linux' && matrix.configuration == 'Release'
with:
files: artifacts/testResults/*/*.cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Publish CI packages to GitHub 🐙
if: runner.os == 'Linux' && matrix.configuration == 'Release' && github.event_name == 'push'
run: make push NUGET_SOURCE=https://nuget.pkg.github.com/eiriktsarpalis/index.json NUGET_API_KEY=${{ secrets.GITHUB_TOKEN }}
- name: Publish CI packages to Feedz.io 🚚
if: runner.os == 'Linux' && matrix.configuration == 'Release' && 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 }}