-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (48 loc) · 1.78 KB
/
ci.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
name: CI
on: [push, pull_request, workflow_dispatch]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
name: ${{ matrix.platform.name }} ${{ matrix.dotnet.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- { name: Linux, os: ubuntu-22.04 }
- { name: Windows VS2022, os: windows-2022 }
- { name: macOS, os: macos-13 }
dotnet:
- { name: .NET 8, version: "8.0.x" }
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET ${{ matrix.dotnet.version }} SDK
id: setup-dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet.version }}
- name: Enforce SDK Version
run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force
- name: Verify SDK Installation
run: dotnet --info
- name: Install Dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish
if: matrix.platform.name == 'Windows VS2022' && matrix.dotnet.name == '.NET 6'
run: |
dotnet publish --runtime win10-x64 --no-self-contained --configuration Release -p:DebugType=None -p:DebugSymbols=false -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true -o Publish
cp ./Start.cmd ./Publish
cp ./README.md ./Publish
cp ./CHANGELOG.md ./Publish
- name: Upload Artifact
if: matrix.platform.name == 'Windows VS2022' && matrix.dotnet.name == '.NET 6'
uses: actions/upload-artifact@v3
with:
name: PIN-${{ github.sha }}
path: Publish