update to .net 9 #775
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-14] | |
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-14' }} | |
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-14' }} | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '16.0' | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.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 |