diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml
index 39cee92..3da2538 100644
--- a/.github/workflows/build-and-deploy.yml
+++ b/.github/workflows/build-and-deploy.yml
@@ -40,7 +40,12 @@ jobs:
- name: Patch csproj version and assembly version
run: |
- $csproj_files = Get-ChildItem -Path '*.csproj'
+ $csproj_files = Get-ChildItem -Recurse -Filter '*.csproj'
+
+ if ($csproj_files.Count -eq 0) {
+ Write-Error "No .csproj files found."
+ exit 1
+ }
$version = (Get-Content $csproj_files[0].FullName) -match '(\d+)\.(\d+)\.(\d+)' | Out-Null
$major = $matches[1]
$minor = $matches[2]
@@ -53,6 +58,7 @@ jobs:
-replace '.*', "$new_version.0" `
| Set-Content $file.FullName
}
+
shell: pwsh
- name: Build