From 75bc612e93dfd15d24bf925d0504caae096e6e00 Mon Sep 17 00:00:00 2001 From: Mike Madeja Date: Fri, 18 Sep 2026 22:24:25 -0500 Subject: [PATCH] feat: mirror README.md on the PowerShell Gallery package page PowerShell Gallery renders a module's README.md automatically if it's present in the published package, but Publish-Module only packages PiHoleShell/, and README.md lived at the repo root, so the Gallery page never showed it. The release workflow now copies README.md into PiHoleShell/ before zipping/publishing (gitignored locally, since it's a build-time artifact, never meant to be committed). Also switches the two screenshot images to absolute GitHub raw URLs instead of repo-relative paths, since a relative path only resolves correctly when viewed from the repo root and would render as a broken image on the Gallery page. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/CreateRelease.yml | 11 +++++++++-- .gitignore | 3 ++- README.md | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index caa4877..b5d58cf 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -51,16 +51,23 @@ jobs: git tag ${{ steps.bump.outputs.new_tag }} git push origin ${{ steps.bump.outputs.new_tag }} + - name: Copy README into module folder + shell: pwsh + run: | + # PowerShell Gallery renders a module's README.md if it's included in the published + # package; Publish-Module only packages the PiHoleShell/ folder, so it has to live there. + Copy-Item -Path README.md -Destination PiHoleShell/README.md -Force + - name: Zip folder shell: pwsh run: | $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)" diff --git a/.gitignore b/.gitignore index 78f21ea..505182c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ notes.txt tests/IntegrationConfig.local.ps1 -TestResults/ \ No newline at end of file +TestResults/ +PiHoleShell/README.md \ No newline at end of file diff --git a/README.md b/README.md index 00ebc27..e575903 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ Import-Module -Name PiHoleShell 1. Log into your Pi-hole web interface, then go to **Web Interface / API** settings and select **Configure app password**. - Pi-hole Web Interface / API settings + Pi-hole Web Interface / API settings 2. Copy the generated password, then click **Enable new app password**. - Configure app password dialog + Configure app password dialog Keep this password secret — anyone with it has full API access to your Pi-hole.