-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (67 loc) · 2.33 KB
/
dotnet.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Build Linux-single-file-app
run: dotnet publish QuIDE/QuIDE.csproj -r linux-x64 -f net8.0 -p:PublishSingleFile=true --self-contained false
- name: Build Windows-single-file-app
run: dotnet publish QuIDE/QuIDE.csproj -r win-x64 -f net8.0 -p:PublishSingleFile=true --self-contained false
- name: Build macOS software
run: dotnet publish QuIDE/QuIDE.csproj -r osx-arm64
- name: build macOS single-file-app
run: dotnet msbuild QuIDE/QuIDE.csproj -t:BundleApp -p:Configuration=Release -p:RuntimeIdentifier=osx-arm64 -p:UseAppHost=true
# will later be put in .dmg
- name: Upload macOS App
uses: actions/upload-artifact@v4
with:
name: QuIDE.app
path: QuIDE/bin/Release/net8.0/osx-arm64/publish/QuIDE.app
compression-level: 0
retention-days: 1
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: QuIDE Linux amd64
path: QuIDE/bin/Release/net8.0/linux-x64/publish/QuIDE
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: QuIDE Windows amd64
path: QuIDE/bin/Release/net8.0/win-x64/publish/QuIDE.exe
build-dmg:
# the dmg-step doesn't work on linux
runs-on: macos-latest
needs: [build]
steps:
- uses: actions/download-artifact@v4
with:
name: QuIDE.app
path: QuIDE.app
# here we could sign the app if we had a certificate
- name: create macOS dmg
uses: L-Super/create-dmg-actons@v1.0.3
with:
dmg_name: QuIDE
src_dir: QuIDE.app
- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: QuIDE macOS arm64
path: QuIDE.dmg