-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (60 loc) · 2.38 KB
/
build.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Continuous Integration
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
name: Build and Upload Artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout from GitHub
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore Dependencies
run: dotnet restore
- name: Get Commit Hash
id: hash
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Run Unit Tests
run: dotnet test -c Release --logger "console;verbosity=detailed" PLRPC.Tests
- name: Publish CLI for Windows x64
run: dotnet publish -c Release -r win-x64 --self-contained PLRPC.CLI
- name: Publish CLI for Linux x64
run: dotnet publish -c Release -r linux-x64 --self-contained PLRPC.CLI
- name: Publish GUI for Windows x64
run: dotnet publish -c Release -r win-x64 --self-contained PLRPC.GUI.Windows
- name: Publish GUI for Linux x64
run: dotnet publish -c Release -r linux-x64 --self-contained PLRPC.GUI.Linux
- name: Upload Windows x64 CLI build
uses: actions/[email protected]
with:
name: PLRPC CLI Windows x64 [${{ steps.hash.outputs.hash }}]
path: "/home/runner/work/PLRPC/PLRPC/PLRPC.CLI/bin/Release/net7.0/win-x64/publish/"
if-no-files-found: error
retention-days: 3
- name: Upload Linux x64 CLI build
uses: actions/[email protected]
with:
name: PLRPC CLI Linux x64 [${{ steps.hash.outputs.hash }}]
path: "/home/runner/work/PLRPC/PLRPC/PLRPC.CLI/bin/Release/net7.0/linux-x64/publish/"
if-no-files-found: error
retention-days: 3
- name: Upload Windows x64 GUI build
uses: actions/[email protected]
with:
name: PLRPC GUI Windows x64 [${{ steps.hash.outputs.hash }}]
path: "/home/runner/work/PLRPC/PLRPC/PLRPC.GUI.Windows/bin/Release/net7.0-windows/win-x64/publish/"
if-no-files-found: error
retention-days: 3
- name: Upload Linux x64 GUI build
uses: actions/[email protected]
with:
name: PLRPC GUI Linux x64 [${{ steps.hash.outputs.hash }}]
path: "/home/runner/work/PLRPC/PLRPC/PLRPC.GUI.Linux/bin/Release/net7.0/linux-x64/publish/"
if-no-files-found: error
retention-days: 3