move changelog to after dependencies

This commit is contained in:
Caelan Sayler
2024-11-02 10:55:17 +00:00
committed by Caelan
parent 5ce50ac9b5
commit 7e4801de3f

View File

@@ -74,14 +74,14 @@ jobs:
path: ./repo path: ./repo
fetch-depth: 0 fetch-depth: 0
- name: Tag the commit with version and push # - name: Tag the commit with version and push
working-directory: ./repo # working-directory: ./repo
run: | # run: |
echo $PKG_VERSION # echo $PKG_VERSION
COMMIT_HASH=$(gh run view ${{ github.event.inputs.workflow_run_id }} --json headSha -q ".headSha") # COMMIT_HASH=$(gh run view ${{ github.event.inputs.workflow_run_id }} --json headSha -q ".headSha")
git checkout $COMMIT_HASH # git checkout $COMMIT_HASH
git tag $PKG_VERSION # git tag $PKG_VERSION
git push origin $PKG_VERSION # git push origin $PKG_VERSION
- name: Generate Release - name: Generate Release
working-directory: ./repo working-directory: ./repo
@@ -130,9 +130,12 @@ jobs:
$lines = $releaseBody -split "`n" $lines = $releaseBody -split "`n"
$dependenciesLines = @() $dependenciesLines = @()
$otherLines = @() $otherLines = @()
$changelog = ""
foreach ($line in $lines) { foreach ($line in $lines) {
if ($line -match '@renovate') { if ($line -match 'Full Changelog') {
$changelog = $line
} elseif ($line -match '@renovate') {
$dependenciesLines += $line $dependenciesLines += $line
} else { } else {
$otherLines += $line $otherLines += $line
@@ -141,9 +144,13 @@ jobs:
$releaseBody = $otherLines -join "`n" $releaseBody = $otherLines -join "`n"
if ($dependenciesLines.Count -gt 0) { if ($dependenciesLines.Count -gt 0) {
$releaseBody += "`n## Dependencies:`n" $releaseBody += "`## Dependency Updates`n"
$releaseBody += "`n`n<details>`n`n"
$releaseBody += "<summary>Expand to see all changed dependencies</summary>`n`n"
$releaseBody += $dependenciesLines -join "`n" $releaseBody += $dependenciesLines -join "`n"
$releaseBody += "`n`n</details>`n"
} }
$releaseBody += "`n`n" + $changelog + "`n"
Write-Host "Release name: $releaseName" Write-Host "Release name: $releaseName"
Write-Host "Release body:" Write-Host "Release body:"