-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (103 loc) · 3.44 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# 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-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Get flatpak-builder
run: DEBIAN_FRONTEND=noninteractive sudo apt -y install flatpak-builder flatpak
- name: add flathub
run: sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
- name: Get Flatpak freedesktop SDK
run: sudo flatpak install --noninteractive --assumeyes flathub org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08
- name: Get PupNet
run: dotnet tool install -g KuiperZone.PupNet
- name: Build RPM
run: pupnet -y -k rpm -o CrankItUp.rpm
- name: Build deb
run: pupnet -y -k deb -o CrankItUp.deb
- name: Build AppImage
run: pupnet -y -k appimage -o CrankItUp.appimage
- name: Build Flatpak
run: pupnet -y -k flatpak -o CrankItUp.flatpak
- name: Build zip
run: pupnet -y -k zip -o CrankItUp.zip
- name: Upload RPM
uses: actions/[email protected]
with:
name: CrankItUp.rpm
path: Deploy/bin/CrankItUp.rpm
- name: Upload deb
uses: actions/[email protected]
with:
name: CrankItUp.deb
path: Deploy/bin/CrankItUp.deb
- name: Upload appimage
uses: actions/[email protected]
with:
name: CrankItUp.appimage
path: Deploy/bin/CrankItUp.appimage
- name: Upload flatpak
uses: actions/[email protected]
with:
name: CrankItUp.flatpak
path: Deploy/bin/CrankItUp.flatpak
- name: Upload zip
uses: actions/[email protected]
with:
name: CrankItUp.zip
path: Deploy/bin/CrankItUp.zip
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --use-current-runtime CrankItUp.Desktop
- name: Test
run: dotnet test --no-build --verbosity normal CrankItUp.Desktop
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: CrankItUp-Windows
path: CrankItUp.Desktop/bin/Debug/net6.0/*
build-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set default Xamarin SDK versions
run: |
$VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12
- name: Set default Xcode 14.0.1
run: |
XCODE_ROOT=/Applications/Xcode_14.0.1.app
echo "MD_APPLE_SDK_ROOT=$XCODE_ROOT" >> $GITHUB_ENV
sudo xcode-select -s $XCODE_ROOT
- name: Setup .NET Core SDK 6.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: nuget restore
- name: Build
run: msbuild CrankItUp.iOS /p:BuildIpa=True /p:IpaPackageDir=/bin /p:IpaPackageName=CrankItUp.ipa /p:Platform=iPhone /p:Configuration=Release /t:Build
- uses: actions/[email protected]
with:
name: CrankItUp-iOS
path: bin/CrankItUp.ipa