From 5c2de27324c968ad513bf3743594ec458877d4c3 Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Sun, 15 Jun 2025 23:00:43 -0500 Subject: [PATCH] debugging --- .github/workflows/CreateRelease.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index d29db44..cfa4aa6 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -49,15 +49,23 @@ jobs: git push origin ${{ steps.bump.outputs.new_tag }} - name: Zip folder + shell: pwsh run: | - $modulePath = "PiHoleShell" # Change to your actual module folder - $manifest = Get-ChildItem -Path $modulePath -Filter PiHoleShell.psd1 -Recurse | Select-Object -First 1 - (Get-Content $($manifest.fullname)) -replace '0.0.0', ($ENV:TAG -replace "v", "") | Out-File $manifest.fullname - Write-Host "Replacing 0.0.0 with $ENV:NEW_TAG" - - mkdir -p output - ls - zip -r output/release.zip PiHoleShell + $modulePath = "PiHoleShell" + $manifest = Get-ChildItem -Path $modulePath -Filter PiHoleShell.psd1 -Recurse | Select-Object -First 1 + + if (-not $manifest) { + throw "No module manifest (*.psd1) found in $modulePath" + } + + $version = $env:NEW_TAG -replace '^v', '' + (Get-Content $manifest.FullName) -replace '0.0.0', $version | Set-Content $manifest.FullName + Write-Host "Replacing 0.0.0 with $version in $($manifest.FullName)" + + mkdir -p output + zip -r output/release.zip PiHoleShell + env: + NEW_TAG: ${{ steps.bump.outputs.new_tag }} - name: Create GitHub Release uses: softprops/action-gh-release@v1