From 0e784bfe37c49f5e0cc8a512249bf6a02f0cb7b3 Mon Sep 17 00:00:00 2001 From: Bryan Cook <3217452+bryanbcook@users.noreply.github.com> Date: Mon, 28 Jul 2025 23:50:40 +0000 Subject: [PATCH 1/7] use softprops/action-gh-release --- .github/workflows/publish.yml | 43 +++++++---------------------------- README.md | 1 - 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d011e86..a3f6d80 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -286,45 +286,18 @@ jobs: Write-Host "Created and pushed tag v${{ steps.version.outputs.version }}" } - - name: Get Commit Messages for Release Notes - if: steps.run-mode.outputs.is-dry-run == 'false' - id: release-notes - shell: pwsh - run: | - # Get the previous tag - $previousTag = git describe --tags --abbrev=0 "v${{ steps.version.outputs.version }}~1" 2>$null - if ($LASTEXITCODE -ne 0) { - # If no previous tag, get last 10 commits - $commits = git log --oneline --pretty=format:"- %s (%h)" -n 10 - } else { - # Get commits since the previous tag - $commits = git log --oneline --pretty=format:"- %s (%h)" "$previousTag..v${{ steps.version.outputs.version }}" - } - - $releaseNotes = @" - ## Changes in version ${{ steps.version.outputs.version }} - - $($commits -join "`n") - - ## Installation - ``````powershell - Install-Module -Name PSBlogger -RequiredVersion ${{ steps.version.outputs.version }} - `````` - "@ - - # Escape for GitHub Actions - $releaseNotes = $releaseNotes -replace "`r`n", "`n" -replace "`n", "%0A" - echo "release-notes=$releaseNotes" >> $env:GITHUB_OUTPUT - - name: Create GitHub Release if: steps.run-mode.outputs.is-dry-run == 'false' - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: tag_name: v${{ steps.version.outputs.version }} - release_name: Release v${{ steps.version.outputs.version }} - body: ${{ steps.release-notes.outputs.release-notes }} + name: Release v${{ steps.version.outputs.version }} + generate_release_notes: true + body: | + ## Installation + ```powershell + Install-Module -Name PSBlogger -RequiredVersion ${{ steps.version.outputs.version }} + ``` draft: false prerelease: false diff --git a/README.md b/README.md index 4b846a0..c67ff72 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ A PowerShell library for publishing markdown files authored in markdown to Blogg choco install pandoc ``` - (Future: still need to publish to PowerShell nuget library) ``` Install-Module PSBlogger ``` From a22925f8f877baa5d54681edb2a1fca7f8466bfe Mon Sep 17 00:00:00 2001 From: Bryan Cook <3217452+bryanbcook@users.noreply.github.com> Date: Mon, 28 Jul 2025 23:51:39 +0000 Subject: [PATCH 2/7] testing release notes --- src/PSBlogger.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PSBlogger.psd1 b/src/PSBlogger.psd1 index 9353ac6..358b5c3 100644 --- a/src/PSBlogger.psd1 +++ b/src/PSBlogger.psd1 @@ -5,7 +5,7 @@ RootModule = 'PSBlogger.psm1' # Version number of this module. -ModuleVersion = '0.3.0' +ModuleVersion = '0.3.1' # Supported PSEditions # CompatiblePSEditions = @() From e00706b7d3216f196fe54740c8ecd38ddf9d3117 Mon Sep 17 00:00:00 2001 From: Bryan Cook <3217452+bryanbcook@users.noreply.github.com> Date: Mon, 28 Jul 2025 23:53:44 +0000 Subject: [PATCH 3/7] suppress ci workflow on main --- .github/workflows/pester-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pester-tests.yml b/.github/workflows/pester-tests.yml index e6f3949..240e964 100644 --- a/.github/workflows/pester-tests.yml +++ b/.github/workflows/pester-tests.yml @@ -3,8 +3,6 @@ name: Pester Tests on: pull_request: branches: [ main ] - push: - branches: [ main ] jobs: pester-tests: From 7623fce41c5d8cfb0a95c31cb58bc5e095a1f757 Mon Sep 17 00:00:00 2001 From: Bryan Cook <3217452+bryanbcook@users.noreply.github.com> Date: Mon, 28 Jul 2025 23:59:41 +0000 Subject: [PATCH 4/7] add permissions to workflow --- .github/workflows/publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a3f6d80..fd3c824 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,8 @@ name: PowerShell Gallery Publishing +permissions: + contents: write + on: # Automatic trigger: when module version changes on main branch push: From 66a45730cb1cac15415519a7de11ad7867f98b5e Mon Sep 17 00:00:00 2001 From: Bryan Cook <3217452+bryanbcook@users.noreply.github.com> Date: Tue, 29 Jul 2025 00:04:27 +0000 Subject: [PATCH 5/7] revert permission --- .github/workflows/publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fd3c824..a3f6d80 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,5 @@ name: PowerShell Gallery Publishing -permissions: - contents: write - on: # Automatic trigger: when module version changes on main branch push: From a8216729911140533c270ad2a92526d25d3c8552 Mon Sep 17 00:00:00 2001 From: Bryan Cook <3217452+bryanbcook@users.noreply.github.com> Date: Tue, 29 Jul 2025 00:05:29 +0000 Subject: [PATCH 6/7] use append body --- .github/workflows/publish.yml | 1 + src/PSBlogger.psd1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a3f6d80..f6fa1ba 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -293,6 +293,7 @@ jobs: tag_name: v${{ steps.version.outputs.version }} name: Release v${{ steps.version.outputs.version }} generate_release_notes: true + append_body: true body: | ## Installation ```powershell diff --git a/src/PSBlogger.psd1 b/src/PSBlogger.psd1 index 358b5c3..4e9083c 100644 --- a/src/PSBlogger.psd1 +++ b/src/PSBlogger.psd1 @@ -5,7 +5,7 @@ RootModule = 'PSBlogger.psm1' # Version number of this module. -ModuleVersion = '0.3.1' +ModuleVersion = '0.3.2' # Supported PSEditions # CompatiblePSEditions = @() From 0ad91d1217e1ee89caf75b26da5c0c9f3da48011 Mon Sep 17 00:00:00 2001 From: bryan cook <3217452+bryanbcook@users.noreply.github.com> Date: Sun, 3 Aug 2025 17:46:21 -0400 Subject: [PATCH 7/7] update to 0.4.0 --- src/PSBlogger.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PSBlogger.psd1 b/src/PSBlogger.psd1 index 4e9083c..246865c 100644 --- a/src/PSBlogger.psd1 +++ b/src/PSBlogger.psd1 @@ -5,7 +5,7 @@ RootModule = 'PSBlogger.psm1' # Version number of this module. -ModuleVersion = '0.3.2' +ModuleVersion = '0.4.0' # Supported PSEditions # CompatiblePSEditions = @()