Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f0db671
Update application description in README.md
rgunawans Apr 17, 2026
839e831
Merge branch 'dotnet:main' into main
Apr 17, 2026
2c4cffc
since Redth.ZXing.Net.Maui deprecated, change with ZXing.Net.Maui, an…
rgunawans Apr 17, 2026
2371028
Merge branch 'main' of https://github.com/rgunawans/maui-samples
rgunawans Apr 17, 2026
6c53edf
since Redth.ZXing.Net.Maui deprecated, change with ZXing.Net.Maui, en…
rgunawans Apr 18, 2026
9ce127e
Refactor UI logic and update MAUI package references
rgunawans Apr 18, 2026
cc917a7
Update 10.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj
rgunawans Apr 18, 2026
2a7ebce
Update 10.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/MobileLog…
rgunawans Apr 18, 2026
d9cc38f
Update 10.0/Apps/PointOfSale/src/PointOfSale/AppShellMobile.xaml
rgunawans Apr 18, 2026
75f283d
Revert "Refactor UI logic and update MAUI package references"
rgunawans Apr 18, 2026
f53ec62
Merge branch 'main' of https://github.com/rgunawans/maui-samples
rgunawans Apr 18, 2026
7d9be95
improvement :
rgunawans Apr 19, 2026
732e2a0
improvement :
rgunawans Apr 19, 2026
a457039
Merge branch 'main' of https://github.com/rgunawans/maui-samples
rgunawans Apr 19, 2026
ed37e36
Update SDK version and rollForward settings
rgunawans Apr 19, 2026
078104c
Update SDK version and rollForward settings
rgunawans Apr 19, 2026
3a35336
Merge branch 'main' of https://github.com/rgunawans/maui-samples
rgunawans Apr 19, 2026
dd744b8
Update workflow to build Android project for PR
rgunawans Apr 19, 2026
b71ab93
Update .NET SDK version to 10.0.x
rgunawans Apr 19, 2026
5b22bc4
Update .NET SDK version to 10.0.x
rgunawans Apr 19, 2026
acb14bf
Merge branch 'main' of https://github.com/rgunawans/maui-samples
rgunawans Apr 19, 2026
7514e04
Enhance build workflow for Android, macOS, and Windows
rgunawans Apr 19, 2026
28601e3
Fix formatting in build-pr.yml for dotnet build commands
rgunawans Apr 19, 2026
fe690f3
Enhance Windows build workflow with dependency restoration
rgunawans Apr 19, 2026
dfa108a
Refactor build-windows section in workflow
rgunawans Apr 19, 2026
caff7e9
Update workflows, dependencies, and .NET SDK version
rgunawans Apr 19, 2026
5611e88
Refactor build-pr.yml for streamlined .NET 10 builds
rgunawans Apr 19, 2026
405e2f9
Add macOS and Windows builds to CI workflow
rgunawans Apr 19, 2026
01ed4c1
Update CI: replace macOS build with Windows build
rgunawans Apr 19, 2026
6ce733f
Update build-pr.yml
rgunawans Apr 26, 2026
1c7efa4
Update build-pr.yml
rgunawans Apr 26, 2026
1e6b8b8
Update build-pr.yml
rgunawans Apr 26, 2026
9eb4d0b
Update build-pr.yml
rgunawans Apr 26, 2026
2b558f6
Update build-pr.yml
rgunawans Apr 26, 2026
bee54a1
Upgrade .NET to 10.0 and add MAUI workload installation
rgunawans Apr 26, 2026
32c1e62
Rename workflow from 'Build Project for PR' to 'build'
rgunawans Apr 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 56 additions & 137 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -1,145 +1,64 @@
name: Build Changed C# Projects for PR
name: build

on:
pull_request:
paths-ignore:
- '**.md'
branches: [ main ]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-26]
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x

- name: Install MAUI Workload
run: dotnet workload install maui

- name: Restore dependencies
run: dotnet restore ./10.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj

- name: Build Android
run: dotnet build ./10.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj -f net10.0-android --configuration Release --no-restore

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

runs-on: ${{ matrix.os }}
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x # Disamakan ke 10.0

- name: Install MAUI Workload
run: dotnet workload install maui # Wajib ada

- name: Restore dependencies
run: dotnet restore ./10.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj

- name: Build Windows
# Tambahkan target framework spesifik jika perlu, contoh: -f net10.0-windows10.0.19041.0
run: dotnet build ./10.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj --configuration Release --no-restore

build-macos:
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Install .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
10.0.x
11.0.x
include-prerelease: true
dotnet-quality: 'preview'

- name: Install .NET MAUI Workload
run: |
dotnet workload config --update-mode manifests
dotnet workload install maui

- name: Select Xcode Version
run: sudo xcode-select -s /Applications/Xcode_26.3.app
if: runner.os == 'macOS'

- name: Find and build changed projects
run: |
$failedProjectCount=0
$skippedProjectCount=0
# Get the list of changed files
$changedFiles = git diff --name-only -r --diff-filter=d HEAD^1 HEAD

$excluded_projects_file="./eng/excluded_projects_" + "${{ runner.os }}".ToLower() + ".txt"
$excluded_projects=@()
$processedProjects=@()

$jobSummaryFile=$env:GITHUB_STEP_SUMMARY

if (Test-Path $excluded_projects_file) {
$excluded_projects = Get-Content -Path $excluded_projects_file | Where-Object { $_ -notmatch "^\s*#" -and $_ -match "\S" }
}

Write-Output "# .NET MAUI Sample Apps Build Status (${{ runner.os }})" | Out-File -FilePath $jobSummaryFile -Append
Write-Output "Only projects that have changes are built." | Out-File -FilePath $jobSummaryFile -Append
Write-Output "| Project | Build Status |" | Out-File -FilePath $jobSummaryFile -Append
Write-Output "|---|---|" | Out-File -FilePath $jobSummaryFile -Append

# Determine the corresponding project for each changed file
foreach ($file in $changedFiles) {
$projectToBuild=""

# Check if the file is a .csproj file
if ($file -like '*.csproj') {
$projectToBuild = $file
} else {
$currentFolder = (Get-Item -LiteralPath (Resolve-Path -Path "$file") -Force).Directory

while ($currentFolder -ne $null -and '' -ne $currentFolder) {
$csprojFiles = Get-ChildItem -Path $currentFolder -Filter '*.csproj' -File

if ($csprojFiles.Count -gt 0) {
break
}
$currentFolder = Split-Path -Parent $currentFolder
}

if ($csprojFiles.Count -gt 0) {
$projectToBuild = $csprojFiles[0].FullName
}
}

if (-not [string]::IsNullOrEmpty($projectToBuild)) {
$projectToBuild = (Resolve-Path -Path $projectToBuild -Relative).Replace("\", "/")

# Only proceed when this project has not been built yet
if (-not ($processedProjects -contains $projectToBuild)) {
Write-Output "::notice:: $projectToBuild is not in processed builds yet"

$processedProjects += $projectToBuild
Write-Output "::notice:: Added $projectToBuild to processed builds"

if ($excluded_projects -contains $projectToBuild) {
Write-Output "::notice:: Skipping build for excluded project: $projectToBuild"
Write-Output "| $projectToBuild | Skipped |" | Out-File -FilePath $jobSummaryFile -Append

$skippedProjectCount++
}
else {
Write-Output "::group:: Building $projectToBuild"

dotnet build $projectToBuild

if ($LASTEXITCODE -gt 0) {
Write-Output "::error:: Build failed for $projectToBuild"
Write-Output "| $projectToBuild | :x: |" | Out-File -FilePath $jobSummaryFile -Append

$failedProjectCount++
}
else {
Write-Output "Build succeeded for $projectToBuild"
Write-Output "| $projectToBuild | :white_check_mark: |" | Out-File -FilePath $jobSummaryFile -Append
}

$proj_dir = [System.IO.Path]::GetDirectoryName($projectToBuild)
Write-Output "Cleaning up bin & obj in $proj_dir"

try {
Get-ChildItem -Path $proj_dir -Directory -Recurse -Include bin,obj | Remove-Item -Recurse -Force
} catch {
Write-Output "::warning:: Failed to clean up bin & obj in $proj_dir"
}

Write-Output "::endgroup::"
}
}
}
else {
Write-Output "::warning:: Found no csproj for file $file"
}
}

if ($failedProjectCount -gt 0) {
Write-Output "" | Out-File -FilePath $jobSummaryFile -Append
Write-Output "# Failed builds: $failedProjectCount" | Out-File -FilePath $jobSummaryFile -Append
Write-Output "# Skipped builds: $skippedProjectCount" | Out-File -FilePath $jobSummaryFile -Append

exit $failedProjectCount
}
shell: powershell
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x # Disamakan ke 10.0

- name: Install MAUI Workload
run: dotnet workload install maui # Wajib ada

- name: Restore dependencies
run: dotnet restore ./10.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj

- name: Build macOS
run: dotnet build ./10.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj -f net10.0-maccatalyst --configuration Release --no-restore
Empty file.
14 changes: 7 additions & 7 deletions 10.0/Apps/PointOfSale/src/PointOfSale.API/PointOfSale.API.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'https' " />
<PropertyGroup Condition=" '$(RunConfiguration)' == 'http' " />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Datasync" Version="5.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Datasync.EFCore" Version="5.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0">
<PackageReference Include="Microsoft.AspNetCore.Datasync" Version="6.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Datasync.EFCore" Version="6.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Identity.Web" Version="2.0.7-preview" />
<PackageReference Include="Microsoft.Identity.Web" Version="4.7.0" />
</ItemGroup>

</Project>
Loading
Loading