-
-
Notifications
You must be signed in to change notification settings - Fork 16
149 lines (118 loc) · 4.25 KB
/
build-maui.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Build - MAUI apps
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
env:
DOTNET_NOLOGO: true # Disable the .NET logo
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry
jobs:
# MAUI Android Build
build-android:
runs-on: windows-latest
defaults:
run:
working-directory: ./src/MauiBlazor.UI/MauiBlazor.UI.Mobile/
name: Android Build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Install MAUI Workload
run: dotnet workload install maui --ignore-failed-sources
- name: Restore Dependencies
run: dotnet restore
- name: Build MAUI Android
run: dotnet publish -c Release -f net7.0-android --no-restore
- name: Upload Android Artifact
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
with:
name: mauiblazor-android-ci-build
path: /a/MauiBlazorTemplate/MauiBlazorTemplate/src/MauiBlazor.UI/MauiBlazor.UI.Mobile/bin/Release/net7.0-android/publish
# MAUI Windows Build
build-windows:
runs-on: windows-2022
defaults:
run:
working-directory: ./src/MauiBlazor.UI/MauiBlazor.UI.Mobile/
name: Windows Build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Install MAUI Workload
run: dotnet workload install maui --ignore-failed-sources
- name: Restore Dependencies
run: dotnet restore
- name: Build MAUI Windows
run: dotnet publish -c Release -f net7.0-windows10.0.19041.0 --no-restore
- name: Upload Windows Artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v3
with:
name: mauiblazor-windows-ci-build
path: \a\MauiBlazorTemplate\MauiBlazorTemplate\src\MauiBlazor.UI\MauiBlazor.UI.Mobile\bin\Release\net7.0-windows10.0.19041.0\win10-x64\publish\
# MAUI iOS Build
build-ios:
runs-on: macos-12
name: iOS Build
defaults:
run:
working-directory: ./src/MauiBlazor.UI/MauiBlazor.UI.Mobile/
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Install MAUI Workload
run: dotnet workload install maui --ignore-failed-sources
- name: Restore Dependencies
run: dotnet restore
- name: Build MAUI iOS
run: dotnet build -c Release -f net7.0-ios --no-restore /p:buildForSimulator=True /p:packageApp=True /p:ArchiveOnBuild=False
- name: Upload iOS Artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v3
with:
name: mauiblazor-ios-ci-build
path: /Users/runner/work/MauiBlazorTemplate/MauiBlazorTemplate/src/MauiBlazor.UI/MauiBlazor.UI.Mobile/bin/Release/net7.0-ios/iossimulator-x64/*.app
# MAUI MacCatalyst Build
build-mac:
runs-on: macos-12
name: MacCatalyst Build
defaults:
run:
working-directory: ./src/MauiBlazor.UI/MauiBlazor.UI.Mobile/
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Install MAUI Workload
run: dotnet workload install maui --ignore-failed-sources
- name: Restore Dependencies
run: dotnet restore
- name: Build MAUI MacCatalyst
run: dotnet publish -f:net7.0-maccatalyst -c:Release --no-restore
- name: Upload MacCatalyst Artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v3
with:
name: mauiblazor-macos-ci-build
path: /Users/runner/work/MauiBlazorTemplate/MauiBlazorTemplate/src/MauiBlazor.UI/MauiBlazor.UI.Mobile/bin/Release/net7.0-maccatalyst/maccatalyst-x64/publish/