Skip to content

Commit

Permalink
Update GitHub release with release notes
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed May 1, 2024
1 parent ef976ff commit 24cd515
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/build-all-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,27 @@ jobs:
merge-multiple: true
path: out

# Release the artifacts into GitHub Releases. @TODO this GHA Action is not ideal, uses old nodejs, but I can't find a better one.
- name: "GH Release"
uses: "marvinpinto/action-automatic-releases@latest"
- name: Generate Release Notes
run: |
generated_release_notes=$(gh api 'repos/{owner}/{repo}/releases/generate-notes' -F tag_name=${{github.ref}} --jq .body)
cat >>"$GITHUB_ENV" <<-EOF
RELEASE_NOTES<<RELEASE_NOTES_EOF
$generated_release_notes
RELEASE_NOTES_EOF
EOF
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
method: sha512
patterns: out/hook_*.tar.gz

- name: Update latest release
uses: softprops/action-gh-release@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{needs.matrix_prep.outputs.created}}"
prerelease: false
title: "${{needs.matrix_prep.outputs.created}}"
body: ${{env.RELEASE_NOTES}}
files: |
out/*.tar.gz
out/hook_*.tar.gz
checksum.txt

0 comments on commit 24cd515

Please sign in to comment.