diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index b687948..7696475 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -50,6 +50,11 @@ jobs: - name: Zip folder 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 @@ -69,9 +74,9 @@ jobs: $apiKey = '${{ secrets.POWERSHELLGALLERY }}' $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" - if (-not $manifest) { throw "No module manifest (*.psd1) found in $modulePath"