-
Notifications
You must be signed in to change notification settings - Fork 34
47 lines (41 loc) · 1.1 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
46
47
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 ]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- run: dotnet --info
- if: contains(matrix.os, 'macOS') || contains(matrix.os, 'ubuntu')
run: ./build.sh
- if: matrix.os == 'windows-latest' && !contains(github.ref, 'refs/tags/')
run: ./build.ps1
- if: matrix.os == '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 }}