-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (78 loc) · 2.94 KB
/
AndoidApp.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
name: Build Andoid App
on:
push:
branches: [ "master" ]
paths:
- 'Smarthome.App/**'
- '.github/workflows/AndroidApp.yml'
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build-android:
runs-on: windows-2022
name: Android Build
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
ProjectFile: Smarthome.App/Smarthome.App.csproj
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
include-prerelease: true
- uses: actions/setup-java@v2
with:
distribution: 'microsoft'
java-version: '11'
- name: Install MAUI Workloads
run: |
dotnet workload install android --ignore-failed-sources
dotnet workload install maui --ignore-failed-sources
- name: Restore Dependencies
run: dotnet restore ${{ env.ProjectFile }}
- name: Build MAUI Android
run: dotnet build ${{ env.ProjectFile }} -c Release -f net6.0-android --no-restore -o ./Android /p:AndroidSigningKeyPass=${{ secrets.ANDROIDSIGNINGKEYPASS }} /p:AndroidSigningStorePass=${{ secrets.ANDROIDSIGNINGKEYPASS }}
- name: Upload Android Artifact
uses: actions/[email protected]
with:
name: android-ci-build
path: ./Android/publish
# build-ios:
# runs-on: macos-12
# name: iOS Build
# 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
# ProjectFile: Smarthome.App/Smarthome.App.csproj
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Setup .NET 6
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 6.0.x
# include-prerelease: true
# - name: Install MAUI Workloads
# run: |
# dotnet workload install ios --ignore-failed-sources
# dotnet workload install maui --ignore-failed-sources
# - name: Set XCode Version
# shell: bash
# run: |
# sudo xcode-select -s "/Applications/Xcode_14.1.app"
# echo "MD_APPLE_SDK_ROOT=/Applications/Xcode_14.1.app" >> $GITHUB_ENV
# - name: Restore Dependencies
# run: dotnet restore ${{ env.ProjectFile }}
# - name: Build MAUI iOS
# run: dotnet build ${{ env.ProjectFile }} -c Release -f net6.0-ios --no-restore -o ./iOS
# - name: Upload iOS Artifact
# uses: actions/[email protected]
# with:
# name: android-ci-build
# path: ./iOS/publish