From 3db27959216988ade19511943d86cbdbe939eca0 Mon Sep 17 00:00:00 2001 From: Toby Hede Date: Sat, 10 Jan 2026 20:54:36 +1100 Subject: [PATCH] feat: add mise release task for GitHub releases Add `mise run release ` command that: - Creates a git tag - Pushes the tag to origin - Creates a GitHub release with auto-generated notes Also adds comprehensive release documentation to DEVELOPMENT.md covering the mise task, manual release process, and re-releasing a failed version. --- DEVELOPMENT.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- mise.toml | 17 +++++++++++++++-- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index f6058ca5..729c909a 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -65,7 +65,7 @@ mise has tasks for: - Running unit tests (`test:unit`) - Running integration tests (`test:integration`, `test:integration:*`) - Building binaries (`build:binary`) and Docker images (`build:docker`) -- Publishing release artifacts (`release`) +- Creating GitHub releases (`release`) — see [Releasing](#releasing) These are the important files in the repo: @@ -741,3 +741,48 @@ Struct definitions make error message strings slightly clearer. Note: not all errors do this at the moment, and we will change over time. +## Releasing + +Releases are published via GitHub Actions when a GitHub release is created. + +### Using mise (recommended) + +```bash +mise run release v2.1.9 +``` + +This will: +1. Create a git tag for the version +2. Push the tag to origin +3. Create a GitHub release with auto-generated notes +4. Trigger the release workflow which builds and publishes Docker images + +### Manual release + +If you need more control over the release process: + +```bash +# Create and push the tag +git tag v2.1.9 +git push origin v2.1.9 + +# Create the GitHub release +gh release create v2.1.9 --generate-notes +``` + +### Re-releasing a version + +If a release fails and you need to re-release the same version: + +```bash +# Delete the GitHub release +gh release delete v2.1.9 --yes + +# Delete the tag (local and remote) +git tag -d v2.1.9 +git push origin :refs/tags/v2.1.9 + +# Create the release again +mise run release v2.1.9 +``` + diff --git a/mise.toml b/mise.toml index d154c3ac..0af31185 100644 --- a/mise.toml +++ b/mise.toml @@ -666,8 +666,21 @@ mise --env tls run proxy:down """ [tasks.release] -description = "Publish release artifacts" -depends = ["release:docker"] +description = "Create a GitHub release" +run = """ +#!/usr/bin/env bash +set -euo pipefail + +VERSION="${1:?Version required, e.g., mise run release v2.1.9}" + +echo "Creating release $VERSION..." + +git tag "$VERSION" +git push origin "$VERSION" +gh release create "$VERSION" --generate-notes + +echo "Done! Release workflow will run automatically." +""" [tasks."release:docker"] description = "Release a Docker image for cipherstash-proxy"