-
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (38 loc) · 1.16 KB
/
build-and-deploy.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
name: Build .NET MAUI Project
on:
workflow_dispatch:
push:
branches: [ "develop" ]
paths-ignore:
- "**.md"
pull_request:
branches: [ "develop" ]
create:
tags:
- '*'
env:
BUILD_CONFIGURATION: Release
DOTNET_VERSION: 8.0.x
CSPROJ_TO_BUILD: ./src/SharedMauiXamlStylesLibrary.SampleApp/SharedMauiXamlStylesLibrary.SampleApp.csproj
jobs:
build-ci:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install .NET MAUI Workload
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore ${{ env.CSPROJ_TO_BUILD }}
- name: Build ${{ env.CSPROJ_TO_BUILD }}
run: dotnet build ${{ env.CSPROJ_TO_BUILD }} -c ${{ env.BUILD_CONFIGURATION }} -f:net8.0-android
- name: Publish APK
run: dotnet publish ${{ env.CSPROJ_TO_BUILD }} -c ${{ env.BUILD_CONFIGURATION }} -f:net8.0-android -o ./output
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: apk
path: ./output/*.apk