-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (36 loc) · 1.12 KB
/
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
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest # Use the latest Ubuntu runner
strategy:
matrix:
platform: [android, ios, macos, windows] # Matrix build for different platforms
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x' # .NET version
- name: Install MAUI workloads
run: |
dotnet workload install maui
- name: Restore dependencies
run: dotnet restore
- name: Build project
run: |
dotnet build --configuration Release --framework ${{ matrix.platform }} --no-restore
- name: Publish for ${{ matrix.platform }}
run: |
dotnet publish --configuration Release --framework ${{ matrix.platform }} --output ./publish --no-restore
- name: Archive artifacts
if: success() # Archive the build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}-output
path: ./publish