Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub release with release notes #212

Merged
merged 1 commit into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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