Skip to content

Atualizar configurações do projeto e manifestos: adicionar opções de … #33

Atualizar configurações do projeto e manifestos: adicionar opções de …

Atualizar configurações do projeto e manifestos: adicionar opções de … #33

name: .NET 8 WinUI 3 CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install Windows App SDK
shell: pwsh
run: |
$progressPreference = 'silentlyContinue'
Invoke-WebRequest -Uri https://aka.ms/windowsappsdk/1.4/1.4.231219000/windowsappruntimeinstall-x64.exe -OutFile windowsappruntimeinstall-x64.exe
Start-Process -FilePath .\windowsappruntimeinstall-x64.exe -ArgumentList "/quiet" -Wait
Remove-Item -Path .\windowsappruntimeinstall-x64.exe
- name: Setup NuGet configuration
shell: pwsh
run: |
# Garantir que apenas a fonte oficial NuGet.org seja usada
dotnet nuget remove source "CommunityToolkit-Labs" --configfile $env:APPDATA\NuGet\NuGet.Config || echo "Fonte não encontrada, continuando"
dotnet nuget remove source "CommunityToolkit-WinUI" --configfile $env:APPDATA\NuGet\NuGet.Config || echo "Fonte não encontrada, continuando"
# Garantir que NuGet.org está configurado
dotnet nuget add source "https://api.nuget.org/v3/index.json" --name "NuGet.org" --configfile $env:APPDATA\NuGet\NuGet.Config
# Listar fontes configuradas para diagnóstico
dotnet nuget list source
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Generate build summary
if: always()
shell: pwsh
run: |
Write-Host "## 📊 Build Summary" >> $env:GITHUB_STEP_SUMMARY
Write-Host "* 🔄 Branch: $env:GITHUB_REF" >> $env:GITHUB_STEP_SUMMARY
Write-Host "* 🛠️ Build realizado em: $(Get-Date)" >> $env:GITHUB_STEP_SUMMARY
Write-Host "* 👤 Autor: $env:GITHUB_ACTOR" >> $env:GITHUB_STEP_SUMMARY