-
-
Notifications
You must be signed in to change notification settings - Fork 192
63 lines (51 loc) · 1.69 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
59
60
61
62
63
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-13]
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-13' }}
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-13' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet workload install maui
- name: Install Tizen
if: ${{ matrix.os == 'windows-latest' }}
run: |
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
.\workload-install.ps1
- name: Build
run: |
cd ${{ env.WORKING_DIRECTORY_PATH }}
dotnet restore --configfile NuGet.config
dotnet build