-
Notifications
You must be signed in to change notification settings - Fork 30
45 lines (39 loc) · 1.15 KB
/
ci.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
40
41
42
43
44
45
name: "CI"
on:
push:
branches:
- master
tags:
- 'v*.*.*'
release:
types: [published]
pull_request:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ macOS-latest, ubuntu-latest, windows-latest ]
dotnet: [ '5.x', '6.x', '7.x']
name: ${{ matrix.os }} - ${{ matrix.dotnet }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: ${{ matrix.dotnet }}
- run: dotnet --info
- if: contains(matrix.runs-on, 'macOS') || contains(matrix.runs-on, 'ubuntu')
run: ./build.sh
- if: matrix.runs-on == 'windows-latest' && !contains(github.ref, 'refs/tags/')
run: ./build.ps1
- if: matrix.runs-on == 'windows-latest' && github.event_name == 'release' && github.event.action == 'published'
run: |
./build.ps1
dotnet nuget push .\artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}