From 7e4801de3f5914a7a699a108ee718a038f364370 Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Sat, 2 Nov 2024 10:55:17 +0000 Subject: [PATCH] move changelog to after dependencies --- .github/workflows/release.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37ba920e..c29c6425 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,14 +74,14 @@ jobs: path: ./repo fetch-depth: 0 - - name: Tag the commit with version and push - working-directory: ./repo - run: | - echo $PKG_VERSION - COMMIT_HASH=$(gh run view ${{ github.event.inputs.workflow_run_id }} --json headSha -q ".headSha") - git checkout $COMMIT_HASH - git tag $PKG_VERSION - git push origin $PKG_VERSION + # - name: Tag the commit with version and push + # working-directory: ./repo + # run: | + # echo $PKG_VERSION + # COMMIT_HASH=$(gh run view ${{ github.event.inputs.workflow_run_id }} --json headSha -q ".headSha") + # git checkout $COMMIT_HASH + # git tag $PKG_VERSION + # git push origin $PKG_VERSION - name: Generate Release working-directory: ./repo @@ -130,9 +130,12 @@ jobs: $lines = $releaseBody -split "`n" $dependenciesLines = @() $otherLines = @() + $changelog = "" foreach ($line in $lines) { - if ($line -match '@renovate') { + if ($line -match 'Full Changelog') { + $changelog = $line + } elseif ($line -match '@renovate') { $dependenciesLines += $line } else { $otherLines += $line @@ -141,9 +144,13 @@ jobs: $releaseBody = $otherLines -join "`n" if ($dependenciesLines.Count -gt 0) { - $releaseBody += "`n## Dependencies:`n" + $releaseBody += "`## Dependency Updates`n" + $releaseBody += "`n`n
`n`n" + $releaseBody += "Expand to see all changed dependencies`n`n" $releaseBody += $dependenciesLines -join "`n" + $releaseBody += "`n`n
`n" } + $releaseBody += "`n`n" + $changelog + "`n" Write-Host "Release name: $releaseName" Write-Host "Release body:"