Skip to content

Commit 9dc7c7d

Browse files
Ci release process (#237)
## 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 aa19a4a + fafab28 commit 9dc7c7d

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

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

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
name: "hook-tarball-${{ matrix.kernel }}"
172172
path: out/*.tar.gz
173173

174-
release:
174+
release-latest:
175175
name: Publish all Hooks to GitHub Releases
176176
needs: [ matrix_prep, build-hook-ensemble ]
177177
runs-on: ubuntu-latest
@@ -238,3 +238,47 @@ jobs:
238238
checksum.txt
239239
prerelease: true
240240
tag_name: latest
241+
242+
release-tag:
243+
name: Publish all Hooks to GitHub Releases for a tag
244+
needs: [ matrix_prep, build-hook-ensemble ]
245+
runs-on: ubuntu-latest
246+
if: startsWith(github.ref, 'refs/tags/v')
247+
steps:
248+
249+
- name: Checkout code
250+
uses: actions/checkout@v4
251+
252+
- name: Download built Hook artifacts
253+
uses: actions/download-artifact@v4
254+
with:
255+
pattern: "hook-tarball-*"
256+
merge-multiple: true
257+
258+
- name: Generate Release Notes
259+
run: |
260+
generated_release_notes=$(gh api 'repos/{owner}/{repo}/releases/generate-notes' -F tag_name=${{github.ref}} --jq .body)
261+
cat >>"$GITHUB_ENV" <<-EOF
262+
RELEASE_NOTES<<RELEASE_NOTES_EOF
263+
$generated_release_notes
264+
RELEASE_NOTES_EOF
265+
EOF
266+
env:
267+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
268+
269+
- name: Generate checksum
270+
uses: jmgilman/actions-generate-checksum@v1
271+
with:
272+
method: sha512
273+
patterns: "*.tar.gz"
274+
275+
- name: Update tag release
276+
uses: softprops/action-gh-release@v2
277+
with:
278+
name: ${{github.ref}}
279+
body: ${{env.RELEASE_NOTES}}
280+
files: |
281+
*.tar.gz
282+
checksum.txt
283+
prerelease: true
284+
tag_name: ${{github.ref}}

0 commit comments

Comments
 (0)