maui-linux/.gitea/workflows/ci.yml

47 lines
1.2 KiB
YAML

# OpenMaui Linux CI/CD Pipeline for Gitea
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_ROOT: C:\dotnet
jobs:
build:
name: Build and Test
runs-on: windows
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Path
shell: pwsh
run: |
echo "C:\dotnet" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "DOTNET_ROOT=C:\dotnet" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Restore dependencies
run: C:\dotnet\dotnet.exe restore
- name: Build
run: C:\dotnet\dotnet.exe build --configuration Release --no-restore
- name: Run tests
run: C:\dotnet\dotnet.exe test --configuration Release --no-build --verbosity normal
continue-on-error: true
- name: Pack NuGet (preview)
run: C:\dotnet\dotnet.exe pack --configuration Release --no-build -o ./nupkg
- name: Upload NuGet artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: ./nupkg/*.nupkg