Skip to content

Commit f9c2f7d

Browse files
Update GitHub release with release notes (#212)
## Description <!--- Please describe what this PR is going to change --> ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents ef976ff + 24cd515 commit f9c2f7d

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/build-all-matrix.yaml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,27 @@ jobs:
176176
merge-multiple: true
177177
path: out
178178

179-
# Release the artifacts into GitHub Releases. @TODO this GHA Action is not ideal, uses old nodejs, but I can't find a better one.
180-
- name: "GH Release"
181-
uses: "marvinpinto/action-automatic-releases@latest"
179+
- name: Generate Release Notes
180+
run: |
181+
generated_release_notes=$(gh api 'repos/{owner}/{repo}/releases/generate-notes' -F tag_name=${{github.ref}} --jq .body)
182+
cat >>"$GITHUB_ENV" <<-EOF
183+
RELEASE_NOTES<<RELEASE_NOTES_EOF
184+
$generated_release_notes
185+
RELEASE_NOTES_EOF
186+
EOF
187+
env:
188+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
189+
190+
- name: Generate checksum
191+
uses: jmgilman/actions-generate-checksum@v1
192+
with:
193+
method: sha512
194+
patterns: out/hook_*.tar.gz
195+
196+
- name: Update latest release
197+
uses: softprops/action-gh-release@v2
182198
with:
183-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
184-
automatic_release_tag: "${{needs.matrix_prep.outputs.created}}"
185-
prerelease: false
186-
title: "${{needs.matrix_prep.outputs.created}}"
199+
body: ${{env.RELEASE_NOTES}}
187200
files: |
188-
out/*.tar.gz
201+
out/hook_*.tar.gz
202+
checksum.txt

0 commit comments

Comments
 (0)