-
Notifications
You must be signed in to change notification settings - Fork 35
86 lines (69 loc) · 2.84 KB
/
ci-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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# this is based on https://github.com/irongut/MauiBeach/blob/master/.github/workflows/ci-build.yml
# this might be useful, too:
# https://github.com/dotnet/maui-samples/blob/main/8.0/Apps/WeatherTwentyOne/devops/GitHubActions/
name: CI Build
on:
push:
pull_request:
branches:
- main
- ci-cd
# push:
# # this will trigger a build on any tag push - you can optionally specify a tag format here
# tags:
# - "*"
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
name: Android Build
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup .NET according to global.json
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
with:
global-json-file: global.json
- name: Install MAUI Workload
run: dotnet workload install maui
- name: Restore Dependencies
run: dotnet restore The49.Maui.BottomSheet.sln
- name: Build MAUI Android
run: dotnet publish sample/The49.Maui.BottomSheet.Sample.csproj -c Release -f net8.0-android --no-restore
- name: Upload Android Artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: bottomsheet-android-ci-build
path: sample/bin/Release/net8.0-android/*Signed.a*
# MAUI iOS Build
# also see https://stackoverflow.com/questions/77641536/how-do-i-build-my-net-8-maui-ios-app-using-xcode-15-in-azure-devops
build-ios:
runs-on: macos-13 # beta, macos-latest is currently alias to macos-12
name: iOS Build
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup .NET according to global.json
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
with:
global-json-file: global.json
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Install MAUI Workload
run: dotnet workload install maui
- name: Restore Dependencies
run: dotnet restore The49.Maui.BottomSheet.sln
- name: Build MAUI iOS
run: dotnet build sample/The49.Maui.BottomSheet.Sample.csproj -c Release -f net8.0-ios --no-restore /p:buildForSimulator=True /p:packageApp=True /p:ArchiveOnBuild=False
- name: Upload iOS Artifact
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: bottomsheet-ios-ci-build
path: sample/bin/Release/net8.0-ios/iossimulator-x64/**/*.app