-
-
Notifications
You must be signed in to change notification settings - Fork 192
58 lines (47 loc) · 1.47 KB
/
dotnet.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
name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-16]
steps:
- name: Prepare variables on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "WORKING_DIRECTORY_PATH=C:/Projects/MauiSamples" >> $env:GITHUB_ENV
- name: Prepare variables on macOS
if: ${{ matrix.os == 'macos-16' }}
run: |
echo "WORKING_DIRECTORY_PATH=/Users/runner/Projects/MauiSamples" >> $GITHUB_ENV
- name: Clone and checkout
run: |
git clone https://github.com/${{ github.repository }}.git ${{ env.WORKING_DIRECTORY_PATH }}
cd ${{ env.WORKING_DIRECTORY_PATH }}
git checkout ${{ github.head_ref || github.ref_name }}
- name: Setup Xcode
if: ${{ matrix.os == 'macos-16' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.0'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-quality: 'preview'
- name: Install dependencies
run: dotnet workload install maui
- name: Build
run: |
cd ${{ env.WORKING_DIRECTORY_PATH }}
dotnet restore --configfile NuGet.config
dotnet build -с Release