Skip to content

Commit ca66312

Browse files
authored
Merge pull request #198 from spinkube/changelog
Add `CHANGELOG.md` to the repo
2 parents 6f91629 + b45a820 commit ca66312

File tree

4 files changed

+71
-7
lines changed

4 files changed

+71
-7
lines changed

.github/workflows/release.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,30 @@ jobs:
4747
mkdir -p _dist
4848
cp ./deployments/workloads/runtime.yaml _dist/runtime.yaml
4949
cp ./deployments/workloads/workload.yaml _dist/workload.yaml
50-
50+
51+
- name: extract changelog
52+
run: |
53+
TAG_NAME=${GITHUB_REF#refs/tags/}
54+
cd $GITHUB_WORKSPACE
55+
./scripts/extract-changelog.sh $TAG_NAME > RELEASE_NOTES.md
56+
cat RELEASE_NOTES.md
57+
5158
- name: create release
5259
if: startsWith(github.ref, 'refs/tags/v')
5360
env:
5461
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5562
run: |
63+
TAG_NAME=${GITHUB_REF#refs/tags/}
64+
if [[ "$TAG_NAME" =~ .+-pre.* ]]; then
65+
PRERELEASE_ARGS="--prerelease --latest=false"
66+
else
67+
PRERELEASE_ARGS=""
68+
fi
5669
gh release create ${{ env.RELEASE_VERSION }} \
57-
--generate-notes \
58-
-p \
70+
--notes-file RELEASE_NOTES.md \
71+
--title ${{ env.RELEASE_VERSION }} \
72+
--verify-tag
73+
$PRERELEASE_ARGS \
5974
_dist/runtime.yaml#example-runtimes \
6075
_dist/workload.yaml#example-workloads \
6176

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Changelog
2+
3+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4+
5+
## [Unreleased] - YYYY-MM-DD
6+
7+
### Added
8+
9+
- Added MQTT trigger and tests ([#175](https://github.com/spinkube/containerd-shim-spin/pull/175))
10+
- Make container environment variables accessible as application variables ([#149](https://github.com/spinkube/containerd-shim-spin/pull/149))
11+
- Added feature to conditionally restart the k0s controller service when present during node installation. ([#167](https://github.com/spinkube/containerd-shim-spin/pull/167))
12+
13+
### Changed
14+
15+
- Updated the minimum required Rust version to 1.79 ([#191](https://github.com/spinkube/containerd-shim-spin/pull/191))
16+
- Refactored the shim code by splitting it into different modules ([#185](https://github.com/spinkube/containerd-shim-spin/pull/185))
17+
- Refactored the Makefile to improve its structure and comments([#171](https://github.com/spinkube/containerd-shim-spin/pull/171))
18+
- Merged two Redis trigger test apps into one ([#176](https://github.com/spinkube/containerd-shim-spin/pull/176))
19+
- Simplified the run command in the documentation ([#184](https://github.com/spinkube/containerd-shim-spin/pull/184))
20+
- Modified Dependabot settings to group patch-level dependency updates ([#162](https://github.com/spinkube/containerd-shim-spin/pull/162))
21+
22+
### Fixed
23+
24+
- Correct currently supported triggers ([#182](https://github.com/spinkube/containerd-shim-spin/pull/182))
25+
- Fixed an error in `setup-linux.sh` script ([#184](https://github.com/spinkube/containerd-shim-spin/pull/184))
26+
- Updated outdated links to `spinkube.dev` ([#170](https://github.com/spinkube/containerd-shim-spin/pull/170))
27+
28+
---
29+
30+
[Unreleased]: https://github.com/spinkube/containerd-shim-spin/compare/v0.15.1...HEAD

release.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@ following:
88
commit selected to be tagged and released.
99

1010
1. Change all references of the version number in package
11-
[Cargo.toml](./Cargo.toml), crate
12-
[Cargo.toml](./containerd-shim-spin/Cargo.toml),
13-
[quickstart](./containerd-shim-spin/quickstart.md), [README](./README.md),
14-
[deployments](./deployments/), and [images](./images/). Run `cargo build
11+
12+
* [Cargo.toml](./Cargo.toml),
13+
* crate [Cargo.toml](./containerd-shim-spin/Cargo.toml),
14+
* [quickstart](./containerd-shim-spin/quickstart.md),
15+
* [README](./README.md),
16+
* [deployments](./deployments/),
17+
* [images](./images/).
18+
* [CHANGELOG.md](./CHANGELOG.md) the Unreleased section should be updated with the new version number and the date of the release. Update the links to new version tag in the footer of CHANGELOG.md
19+
20+
Run `cargo build
1521
--release` to make sure lockfiles reflect Cargo.toml updates. Add a new
1622
column to the [README shim and Spin version
1723
map](./README.md#shim-and-spin-version-map) that lists the version of the
1824
Spin dependencies for the release.
25+
1926

2027
1. Create a pull request with these changes and merge once approved.
2128

scripts/extract-changelog.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Inspired by https://stackoverflow.com/questions/40450238/parse-a-changelog-and-extract-changes-for-a-version
3+
# This script will extract the changelog for a specific version from the CHANGELOG.md file
4+
# Usage: ./extract-changelog.sh <version>
5+
version=$1
6+
7+
awk -v ver="$version" '
8+
/^## \[.*\]/ {
9+
if (p) exit
10+
if ($0 ~ "^## \\[" ver "\\]") { p=1; next }
11+
}
12+
p' CHANGELOG.md

0 commit comments

Comments
 (0)