-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (57 loc) · 1.95 KB
/
dotnet-desktop.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
name: Cross-Platform Build and Release
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux-x64, win-x64, osx-x64, osx-arm64]
include:
- net_version: "net8.0"
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Setup .NET SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
# Create directories for the build outputs
- name: Create release directories
run: mkdir -p bin/${{ matrix.platform }}
# Publish ThirtyDollarConverter.GUI project
- name: Publish ThirtyDollarConverter.GUI
run: |
dotnet publish ./ThirtyDollarConverter.GUI/ThirtyDollarConverter.GUI.csproj \
-c Release -r ${{ matrix.platform }} \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-o ./bin/${{ matrix.platform }}
# Publish ThirtyDollarVisualizer project
- name: Publish ThirtyDollarVisualizer
run: |
dotnet publish ./ThirtyDollarVisualizer/ThirtyDollarVisualizer.csproj \
-c Release -r ${{ matrix.platform }} \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-o ./bin/${{ matrix.platform }}
# Clean up unnecessary files before zipping
- name: Clean up build artifacts
run: |
cd "./bin/${{ matrix.platform }}"
rm -rf ./*.dll ./*.dylib ./*.so ./*.pdb ./runtimes
# Upload the zipped release assets as artifacts
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-release
path: bin/${{ matrix.platform }}