Skip to content

Commit

Permalink
add release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
irkode committed Aug 21, 2024
1 parent b8f3749 commit f4ebd4f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
git config --local user.name ${{ secrets.GH_USER_NAME }}
git config --global user.email ${{ secrets.GH_USER_MAIL }}
git fetch --tags
- name: Prepare repository
run: |
# cleanup rubbish from the past
Expand All @@ -57,7 +58,7 @@ jobs:
}
}
} | Sort-Object -Property release
Write-Output "All BULMA Releases"
Write-Output "All new BULMA Releases"
$BulmaReleases | FT | Out-Host
$BulmaRelease = $BulmaReleases | Where-Object { -Not $_.known } | Select-Object -First 1
if ($BulmaRelease) {
Expand All @@ -77,11 +78,16 @@ jobs:
Get-ChildItem .\assets | Out-Host
Write-Error "Aborting - please check"
}
Remove-Item $BulmaRelease.archive -ErrorAction SilentlyContinue
[void](Test-Path $BulmaRelease.archive -ErrorAction Stop)
echo "BULMA_RELEASE=$($BulmaRelease.release)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8
echo "BULMA_ARCHIVE=$($BulmaRelease.archive)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8
Write-Output "download successful: $($BulmaRelease.archive)"
$notes = @("### This release contains the following style files:`n", "- CSS`n")
$notes += Get-ChildItem -Path .\assets\bulma -filter "*.css" -recurse | Resolve-Path -Relative | %{ " - $_" }
$notes += "`n - SASS`n "
$notes += Get-ChildItem -Path .\assets\bulma -filter "*.sass" | Resolve-Path -Relative | %{ " - $_" }
$notes += "`nRelease details on the [official release page](https://github.com/jgthms/bulma/releases/tag/$($BulmaRelease.release))"
$notes | Set-Content -encoding utf8 notes.md
Get-Content notes.md
} else {
Write-Output "No new Bulma Version found to pack"
}
Expand All @@ -91,8 +97,6 @@ jobs:
Write-Host "Creating Release for $ENV:BULMA_RELEASE : $ENV:BULMA_ARCHIVE"
$BulmaRelease = "$ENV:BULMA_RELEASE"
$BulmaArchive = "$ENV:BULMA_ARCHIVE"
$cwd = ($pwd.Path -replace "\\","\\") + "\\"
(Get-ChildItem .).FullName -replace $cwd, ""|sort
$bulmaBranch = "bulma-$BulmaRelease"
git checkout -b $bulmaBranch
git add assets .github
Expand All @@ -101,7 +105,6 @@ jobs:
# git tag -a "v$BulmaRelease" -m "packed Bulma release $BulmaRelease"
# git push --tags
git checkout main
gh auth login
gh release create "v$BulmaRelease" --title "Bulma4Hugo v$BulmaRelease" --target $bulmaBranch --latest
gh release create "v$BulmaRelease" --title "Bulma4Hugo v$BulmaRelease" --target $bulmaBranch --latest --notes-file notes.md
git branch -D $bulmaBranch
git push origin --delete $bulmaBranch

0 comments on commit f4ebd4f

Please sign in to comment.