-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.23 KB
/
build.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
48
49
50
51
52
name: Publish .NET Application
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet publish -c Release --self-contained -p:PublishTrimmed=true -o ./publish
- name: Archive build (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: tar -czvf xpathrunner-ubuntu.tar.gz -C ./publish .
- name: Archive build (macOS)
if: matrix.os == 'macos-latest'
run: tar -czvf xpathrunner-macos.tar.gz -C ./publish .
- name: Archive build (Windows)
if: matrix.os == 'windows-latest'
run: Compress-Archive -Path ./publish/* -DestinationPath xpathrunner-windows.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-build
path: |
xpathrunner-ubuntu.tar.gz
xpathrunner-macos.tar.gz
xpathrunner-windows.zip