Skip to content

Commit

Permalink
Ci release process (#237)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
jacobweinstock authored Jul 31, 2024
2 parents aa19a4a + fafab28 commit 9dc7c7d
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion .github/workflows/build-all-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
name: "hook-tarball-${{ matrix.kernel }}"
path: out/*.tar.gz

release:
release-latest:
name: Publish all Hooks to GitHub Releases
needs: [ matrix_prep, build-hook-ensemble ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -238,3 +238,47 @@ jobs:
checksum.txt
prerelease: true
tag_name: latest

release-tag:
name: Publish all Hooks to GitHub Releases for a tag
needs: [ matrix_prep, build-hook-ensemble ]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Download built Hook artifacts
uses: actions/download-artifact@v4
with:
pattern: "hook-tarball-*"
merge-multiple: true

- 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: "*.tar.gz"

- name: Update tag release
uses: softprops/action-gh-release@v2
with:
name: ${{github.ref}}
body: ${{env.RELEASE_NOTES}}
files: |
*.tar.gz
checksum.txt
prerelease: true
tag_name: ${{github.ref}}

0 comments on commit 9dc7c7d

Please sign in to comment.