Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,30 @@ jobs:
mkdir -p _dist
cp ./deployments/workloads/runtime.yaml _dist/runtime.yaml
cp ./deployments/workloads/workload.yaml _dist/workload.yaml


- name: extract changelog
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
cd $GITHUB_WORKSPACE
./scripts/extract-changelog.sh $TAG_NAME > RELEASE_NOTES.md
cat RELEASE_NOTES.md

- name: create release
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
if [[ "$TAG_NAME" =~ .+-pre.* ]]; then
PRERELEASE_ARGS="--prerelease --latest=false"
else
PRERELEASE_ARGS=""
fi
gh release create ${{ env.RELEASE_VERSION }} \
--generate-notes \
-p \
--notes-file RELEASE_NOTES.md \
--title ${{ env.RELEASE_VERSION }} \
--verify-tag
$PRERELEASE_ARGS \
_dist/runtime.yaml#example-runtimes \
_dist/workload.yaml#example-workloads \

Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

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).

## [Unreleased] - YYYY-MM-DD

### Added

- Added MQTT trigger and tests ([#175](https://github.com/spinkube/containerd-shim-spin/pull/175))
- Make container environment bariables accessible as application variables ([#149](https://github.com/spinkube/containerd-shim-spin/pull/149))
- Added feature to conditionally restart the k0s controller service when present during node installation. ([#167](https://github.com/spinkube/containerd-shim-spin/pull/167))

### Changed

- Updated the minimum required Rust version to 1.79 ([#191](https://github.com/spinkube/containerd-shim-spin/pull/191))
- Refactored the shim code by splitting it into different modules ([#185](https://github.com/spinkube/containerd-shim-spin/pull/185))
- Refactored the Makefile to improve its structure and comments([#171](https://github.com/spinkube/containerd-shim-spin/pull/171))
- Merged two Redis trigger test apps into one ([#176](https://github.com/spinkube/containerd-shim-spin/pull/176))
- Simplified the run command in the documentation ([#184](https://github.com/spinkube/containerd-shim-spin/pull/184))
- Modified Dependabot settings to group patch-level dependency updates ([#162](https://github.com/spinkube/containerd-shim-spin/pull/162))

### Fixed

- Correct currently supported triggers ([#182](https://github.com/spinkube/containerd-shim-spin/pull/182))
- Fixed an error in `setup-linux.sh` script ([#184](https://github.com/spinkube/containerd-shim-spin/pull/184))
- Updated outdated links to `spinkube.dev` ([#170](https://github.com/spinkube/containerd-shim-spin/pull/170))

---

[Unreleased]: https://github.com/spinkube/containerd-shim-spin/compare/v0.15.1...HEAD
15 changes: 11 additions & 4 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ following:
commit selected to be tagged and released.

1. Change all references of the version number in package
[Cargo.toml](./Cargo.toml), crate
[Cargo.toml](./containerd-shim-spin/Cargo.toml),
[quickstart](./containerd-shim-spin/quickstart.md), [README](./README.md),
[deployments](./deployments/), and [images](./images/). Run `cargo build

* [Cargo.toml](./Cargo.toml),
* crate [Cargo.toml](./containerd-shim-spin/Cargo.toml),
* [quickstart](./containerd-shim-spin/quickstart.md),
* [README](./README.md),
* [deployments](./deployments/),
* [images](./images/).
* [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

Run `cargo build
--release` to make sure lockfiles reflect Cargo.toml updates. Add a new
column to the [README shim and Spin version
map](./README.md#shim-and-spin-version-map) that lists the version of the
Spin dependencies for the release.


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

Expand Down
12 changes: 12 additions & 0 deletions scripts/extract-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# Inspired by https://stackoverflow.com/questions/40450238/parse-a-changelog-and-extract-changes-for-a-version
# This script will extract the changelog for a specific version from the CHANGELOG.md file
# Usage: ./extract-changelog.sh <version>
version=$1

awk -v ver="$version" '
/^## \[.*\]/ {
if (p) exit
if ($0 ~ "^## \\[" ver "\\]") { p=1; next }
}
p' CHANGELOG.md