# 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: 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: List NuGet packages run: dir .\nupkg\ - name: Push to NuGet.org if: github.ref == 'refs/heads/main' && github.event_name == 'push' run: | foreach ($pkg in (Get-ChildItem .\nupkg\*.nupkg)) { C:\dotnet\dotnet.exe nuget push $pkg.FullName --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate } env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}