Skip to content

format code with dotnet-format #589

format code with dotnet-format

format code with dotnet-format #589

Workflow file for this run

name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
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@v2
with:
dotnet-version: 7.0.x
include-prerelease: true
- 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