-
Notifications
You must be signed in to change notification settings - Fork 130
83 lines (77 loc) · 2.7 KB
/
NewsReader.CI.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
name: NewsReader.CI
on:
push:
paths:
- 'src/*'
- 'src/NewsReader/**'
- '.github/workflows/**'
- '!.github/workflows/System.Waf.CI.yml'
jobs:
GetVersion:
uses: ./.github/workflows/GetBuildVersion.yml
Android:
runs-on: windows-2022
needs: GetVersion
steps:
- uses: actions/checkout@v4
- name: Install .NET MAUI
run: |
dotnet workload install maui android
- name: Build
run: |
cd src/NewsReader/NewsReader.MauiSystem
dotnet publish -f:net8.0-android -c:Release -p:ApplicationVersion=${{ needs.GetVersion.outputs.versionCode }} -p:ApplicationDisplayVersion=${{ needs.GetVersion.outputs.version }}
- name: Upload AAB, APK
uses: actions/upload-artifact@v4
with:
name: newsreader-android
if-no-files-found: error
path: |
./**/publish/*Signed.aab
./**/publish/*Signed.apk
Windows:
runs-on: windows-2022
needs: GetVersion
steps:
- uses: actions/checkout@v4
- name: Install .NET MAUI
run: |
dotnet workload install maui
- name: Build
# -p:ApplicationVersion=0 because of https://github.com/dotnet/maui/issues/18571
run: |
cd src/NewsReader/NewsReader.MauiSystem
dotnet publish -f:net8.0-windows10.0.19041.0 -c:Release -p:ApplicationDisplayVersion=${{ needs.GetVersion.outputs.version }} -p:ApplicationVersion=0
iOS:
runs-on: macos-14
needs: GetVersion
steps:
- uses: actions/checkout@v4
- name: Set Xcode version
run: |
XCODE_ROOT=/Applications/Xcode_15.4.app
echo "MD_APPLE_SDK_ROOT=$XCODE_ROOT" >> $GITHUB_ENV # set environment variable to specify Xcode for Mono and Xamarin
sudo xcode-select -s $XCODE_ROOT
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install .NET MAUI
run: |
dotnet workload install maui ios
- name: Build
run: |
cd src/NewsReader/NewsReader.MauiSystem
dotnet build -f net8.0-ios -c:Release /p:packageApp=false /p:buildForSimulator=true /p:ArchiveOnBuild=false -p:ApplicationVersion=${{ needs.GetVersion.outputs.version }} -p:ApplicationDisplayVersion=${{ needs.GetVersion.outputs.version }}
Test:
runs-on: windows-2022
needs: GetVersion
steps:
- uses: actions/checkout@v4
- name: Domain.Test
run: |
cd src/NewsReader/NewsReader.Domain.Test
dotnet test -c:Release -p:Version=${{ needs.GetVersion.outputs.version }}
- name: Presentation.Test
run: |
cd src/NewsReader/NewsReader.Presentation.Test
dotnet test -c:Release -p:Version=${{ needs.GetVersion.outputs.version }}