Skip to content

Commit 7e67a07

Browse files
authored
Switch to mostly manual release notes (#368)
* Use manual release notes instead of automatic Signed-off-by: Ludvig Liljenberg <[email protected]> * Make dependabot use kind/dependencies Signed-off-by: Ludvig Liljenberg <[email protected]> * Change link for prelease Signed-off-by: Ludvig Liljenberg <[email protected]> --------- Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent d9f49e3 commit 7e67a07

7 files changed

+123
-33
lines changed

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ updates:
1010
schedule:
1111
interval: "daily"
1212
labels:
13-
- "area/dependencies"
13+
- "kind/dependencies"

.github/release.yml

+5-28
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,11 @@
11
# .github/release.yml
22

33
changelog:
4-
exclude:
5-
labels:
6-
- chore
74
categories:
8-
- title: 🛠 Breaking Changes
9-
labels:
10-
- breaking-change
11-
- title: 🎉 New Features
12-
labels:
13-
- enhancement
14-
- title: 🐛 Bug Fixes
15-
labels:
16-
- bug
17-
- title: 🔒 Security Fixes
18-
labels:
19-
- security
20-
- title: 🚀 Performance Improvements
21-
labels:
22-
- performance
23-
- title: 👒 Dependencies
24-
labels:
25-
- dependencies
26-
- title: 📚 Documentation
27-
labels:
28-
- documentation
29-
- title: 🔬 Testing
30-
labels:
31-
- testing
32-
- title: 📝 Other Changes
5+
- title: Full Changelog (excl. dependencies)
336
labels:
347
- "*"
8+
- title: Full Changelog (dependencies)
9+
labels:
10+
- kind/dependencies
11+

.github/workflows/CreateRelease.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ jobs:
108108
rust-toolchain: "1.81.0"
109109
env:
110110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111-
111+
112+
# HYPERLIGHT_VERSION does not include the v prefix
112113
- name: Set HYPERLIGHT_VERSION
113114
if: ${{ contains(github.ref, 'refs/heads/release/') }}
114115
id: set_hyperlight_version
@@ -176,12 +177,24 @@ jobs:
176177
Write-Host "msiexec exited with code $LASTEXITCCODE"
177178
if ($LASTEXITCODE -ne 0) { cat log.txt; exit 1 }
178179
180+
- name: Extract release notes from changelog
181+
if: ${{ contains(github.ref, 'refs/heads/release/') }}
182+
run: |
183+
# Extract the changelog from the changelog file
184+
just create-release-notes v${{ env.HYPERLIGHT_VERSION }} > RELEASE_NOTES.md
185+
186+
- name: Extract prerelease notes from changelog
187+
if: ${{ github.ref=='refs/heads/main' }}
188+
run: |
189+
# Extract the changelog from the changelog file
190+
just create-release-notes dev-latest > RELEASE_NOTES.md
191+
179192
# Publish the native guests so that its possible to use Hyperlight without building it.
180193
- name: Create release
181194
# Only create a release from tag if we are on a release branch
182195
if: ${{ contains(github.ref, 'refs/heads/release/') }}
183196
run: |
184-
gh release create v${{ env.HYPERLIGHT_VERSION }} -t "Release v${{ env.HYPERLIGHT_VERSION }}" --generate-notes `
197+
gh release create v${{ env.HYPERLIGHT_VERSION }} -t "Release v${{ env.HYPERLIGHT_VERSION }}" --notes-file RELEASE_NOTES.md `
185198
src/tests/rust_guests/bin/${{ env.CONFIG }}/callbackguest `
186199
src/tests/rust_guests/bin/${{ env.CONFIG }}/callbackguest.exe `
187200
src/tests/rust_guests/bin/${{ env.CONFIG }}/simpleguest `
@@ -203,7 +216,7 @@ jobs:
203216
if: ${{ github.ref=='refs/heads/main' }}
204217
run: |
205218
gh release delete dev-latest -y --cleanup-tag || $true
206-
gh release create dev-latest -t "Latest prerelease from main branch" --latest=false -p `
219+
gh release create dev-latest -t "Latest prerelease from main branch" --notes-file RELEASE_NOTES.md --latest=false -p `
207220
src/tests/rust_guests/bin/${{ env.CONFIG }}/callbackguest `
208221
src/tests/rust_guests/bin/${{ env.CONFIG }}/callbackguest.exe `
209222
src/tests/rust_guests/bin/${{ env.CONFIG }}/simpleguest `

CHANGELOG.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Changelog
2+
3+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4+
5+
## [Prerelease] - Unreleased
6+
7+
### Added
8+
- Add fuzzing targets for fuzzing guest and host call parameters and return value by @ludfjig in [#259](https://github.com/hyperlight-dev/hyperlight/pull/259)
9+
10+
### Changed
11+
- Make host-guest result API generic by @ludfjig in [#259](https://github.com/hyperlight-dev/hyperlight/pull/259)
12+
13+
### Removed
14+
-
15+
16+
### Fixed
17+
- Fixed devcontainer permission issues by @myadav in [#326](https://github.com/hyperlight-dev/hyperlight/pull/326)
18+
19+
## [v0.2.0] - 2025-02-25
20+
21+
### Added
22+
- Adds support for Azure Linux 3 by @simongdavies in [#51](https://github.com/hyperlight-dev/hyperlight/pull/51)
23+
- Add GDB support by @dblnz in [#111](https://github.com/hyperlight-dev/hyperlight/pull/111)
24+
- Document DCO by @devigned in [#22](https://github.com/hyperlight-dev/hyperlight/pull/22)
25+
- Run CI on intel machines by @danbugs in [#32](https://github.com/hyperlight-dev/hyperlight/pull/32)
26+
- Run spell checks on repo by @andreiltd in [#58](https://github.com/hyperlight-dev/hyperlight/pull/58)
27+
- Add devcontainer config by @dblnz in [#54](https://github.com/hyperlight-dev/hyperlight/pull/54)
28+
- Add exception handling to Hyperlight guest by @danbugs in [#250](https://github.com/hyperlight-dev/hyperlight/pull/250)
29+
- Add community meeting info to our README.md by @marosset in [#231](https://github.com/hyperlight-dev/hyperlight/pull/231)
30+
31+
### Changed
32+
- Avoid eagerly doing unnecessary string formatting by @ludfjig in [#73](https://github.com/hyperlight-dev/hyperlight/pull/73)
33+
- Use `CreateFileMapping\MapViewOfFile` and `UnmapViewOfFile\CloseHandle` instead of `VirtualAllocEx` and `VirtualFreeEx` on Windows by @simongdavies in [#135](https://github.com/hyperlight-dev/hyperlight/pull/135)
34+
- Avoid requiring specific environment variables during testing by @ludfjig in [#108](https://github.com/hyperlight-dev/hyperlight/pull/108)
35+
36+
### Removed
37+
- Remove SingleUseSandbox by @ludfjig in [#125](https://github.com/hyperlight-dev/hyperlight/pull/125)
38+
- Remove custom alloca by @ludfjig in [#106](https://github.com/hyperlight-dev/hyperlight/pull/106)
39+
40+
### Fixed
41+
- Fix issues with using `CreateMapViewOfFile` with `inprocess` feature by @simongdavies in [#2340](https://github.com/hyperlight-dev/hyperlight/pull/2340)
42+
- Reset guest memory when guest function fails by @ludfjig in [#208](https://github.com/hyperlight-dev/hyperlight/pull/208)
43+
- Improve error when guest binary not found by @ludfjig in [#55](https://github.com/hyperlight-dev/hyperlight/pull/55)
44+
- Ensure windows version is supported by @simongdavies in [#110](https://github.com/hyperlight-dev/hyperlight/pull/110)
45+
46+
47+
48+
## [v0.1.0] - 2024-11-24
49+
50+
The Initial Hyperlight Release 🎉
51+
52+
53+
[Prerelease]: <https://github.com/hyperlight-dev/hyperlight/compare/v0.2.0..HEAD>
54+
[v0.2.0]: <https://github.com/hyperlight-dev/hyperlight/compare/v0.1.0...v0.2.0>
55+
[v0.1.0]: <https://github.com/hyperlight-dev/hyperlight/releases/tag/v0.1.0>

Justfile

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ tar-static-lib: (build-rust-capi "release") (build-rust-capi "debug")
3232
tar -zcvf hyperlight-guest-c-api-windows.tar.gz -C {{root}}/target/x86_64-pc-windows-msvc/ release/hyperlight_guest_capi.lib -C {{root}}/target/x86_64-pc-windows-msvc/ debug/hyperlight_guest_capi.lib
3333
tar -zcvf hyperlight-guest-c-api-linux.tar.gz -C {{root}}/target/x86_64-unknown-none/ release/libhyperlight_guest_capi.a -C {{root}}/target/x86_64-unknown-none/ debug/libhyperlight_guest_capi.a
3434

35+
# Create release notes for the given tag. The expected format is a v-prefixed version number, e.g. v0.2.0
36+
# For prereleases, the version should be "dev-latest"
37+
@create-release-notes tag:
38+
echo "## What's Changed"
39+
./dev/extract-changelog.sh {{ if tag == "dev-latest" { "Prerelease" } else { tag } }}
40+
gh api repos/{owner}/{repo}/releases/generate-notes -f tag_name={{ tag }} | jq -r '.body' | sed '1,/## What'"'"'s Changed/d'
3541

3642
# BUILDING
3743
build-rust-guests target=default-target:

dev/extract-changelog.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
set -Eeuo pipefail
3+
4+
# Inspired by https://stackoverflow.com/questions/40450238/parse-a-changelog-and-extract-changes-for-a-version
5+
# This script will extract the changelog for a specific version from the CHANGELOG.md file
6+
# Usage: ./extract-changelog.sh <version>, for example ./extract-changelog.sh v0.2.0
7+
8+
if [[ $# -lt 1 ]]; then
9+
echo "Usage: $0 <version>"
10+
echo " Example: $0 v0.2.0"
11+
echo " Example: $0 Prerelease"
12+
exit 1
13+
fi
14+
15+
version=$1
16+
17+
awk -v ver="$version" '
18+
/^## \[.*\]/ {
19+
if (p) exit
20+
if ($0 ~ "^## \\[" ver "\\]") { p=1; next }
21+
}
22+
p' CHANGELOG.md

docs/how-to-make-releases.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,26 @@ Currently, we need to manually update the workspace `Cargo.toml` version number
1010
1111
Create a PR with this change and merge it into the main branch.
1212

13+
## Update `CHANGELOG.md`
14+
15+
The `CHANGELOG.md` file is a critical document used to track changes made to Hyperlight. It serves as the foundation for generating release notes, so it's essential to keep it up to date with each release. While not every change needs to be added to this file (since a complete changelog of all PRs will be automatically generated), it's crucial to include all significant updates.
16+
17+
### Steps to Update `CHANGELOG.md`:
18+
19+
- **Manually update the `CHANGELOG.md`** with important changes since the latest release. Ideally, contributors should update this file as part of their PR, but this may not always happen.
20+
21+
- **Rename the `[Prerelease] - Unreleased` section** to reflect the new version number (if not already done). Ensure that it links to the GitHub comparison between the current and previous versions. For example, `v0.2.0` should link to `https://github.com/hyperlight-dev/hyperlight/compare/v0.1.0...v0.2.0` (see the footer of `CHANGELOG.md`).
22+
23+
- **Add a new `[Prerelease]` section** at the top of the file. This section should initially be empty and will track changes for the next release.
24+
25+
- **Preview the automatically generated release notes** locally using the command:
26+
`just create-release-notes v0.4.0 > notes.md`. Review the notes to ensure everything looks accurate.
27+
28+
- **Create a PR** with the updated `CHANGELOG.md` and merge it into the main branch once all changes are confirmed.
29+
1330
## Create a tag
1431

15-
When the above PR has merged into `main` branch you should create a tag. ***Make sure you have pulled the recently updated `main` branch***, and do the following on the `main` branch:
32+
When both above PRs has merged into `main` branch you should create a tag. ***Make sure you have pulled the recently updated `main` branch***, and do the following on the `main` branch:
1633

1734
```bash
1835
git tag -a v0.4.0 -m "A brief description of the release"

0 commit comments

Comments
 (0)