-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.72 KB
/
Copy pathci.yml
File metadata and controls
52 lines (50 loc) · 1.72 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
name: Build and test gitco.NET
on: [push]
jobs:
build:
strategy:
fail-fast: false
matrix:
dotnet-version:
- '10.0.x'
image:
- windows-latest
- ubuntu-latest
- macos-latest
include:
- image: windows-latest
runtime: win-x64
extension: .exe
- image: ubuntu-latest
runtime: linux-x64
extension: ""
- image: macos-latest
runtime: osx-arm64
extension: ""
runs-on: ${{ matrix.image }}
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore -v normal
- name: Build
run: dotnet build -v normal -c Release
- name: Test with dotnet
run: dotnet test -v normal
- name: Publish framework-dependent
run: dotnet publish -v normal -c Release -o publishFD -r ${{ matrix.runtime }} --no-self-contained gitco.NET/gitco.NET.csproj
- name: Publish self-contained
run: dotnet publish -v normal -c Release -o publishSC -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true gitco.NET/gitco.NET.csproj
- name: Upload framework-dependent
uses: actions/upload-artifact@v4
with:
name: gitco_${{ matrix.runtime }}${{ matrix.extension }}
path: publishFD/gitco${{ matrix.extension }}
- name: Upload self-contained
uses: actions/upload-artifact@v4
with:
name: gitco_${{ matrix.runtime }}_self-contained${{ matrix.extension }}
path: publishSC/gitco${{ matrix.extension }}