Skip to content

Commit 3db2795

Browse files
committed
feat: add mise release task for GitHub releases
Add `mise run release <version>` 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.
1 parent 467859d commit 3db2795

2 files changed

Lines changed: 61 additions & 3 deletions

File tree

DEVELOPMENT.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mise has tasks for:
6565
- Running unit tests (`test:unit`)
6666
- Running integration tests (`test:integration`, `test:integration:*`)
6767
- Building binaries (`build:binary`) and Docker images (`build:docker`)
68-
- Publishing release artifacts (`release`)
68+
- Creating GitHub releases (`release`) — see [Releasing](#releasing)
6969

7070
These are the important files in the repo:
7171

@@ -741,3 +741,48 @@ Struct definitions make error message strings slightly clearer.
741741

742742
Note: not all errors do this at the moment, and we will change over time.
743743

744+
## Releasing
745+
746+
Releases are published via GitHub Actions when a GitHub release is created.
747+
748+
### Using mise (recommended)
749+
750+
```bash
751+
mise run release v2.1.9
752+
```
753+
754+
This will:
755+
1. Create a git tag for the version
756+
2. Push the tag to origin
757+
3. Create a GitHub release with auto-generated notes
758+
4. Trigger the release workflow which builds and publishes Docker images
759+
760+
### Manual release
761+
762+
If you need more control over the release process:
763+
764+
```bash
765+
# Create and push the tag
766+
git tag v2.1.9
767+
git push origin v2.1.9
768+
769+
# Create the GitHub release
770+
gh release create v2.1.9 --generate-notes
771+
```
772+
773+
### Re-releasing a version
774+
775+
If a release fails and you need to re-release the same version:
776+
777+
```bash
778+
# Delete the GitHub release
779+
gh release delete v2.1.9 --yes
780+
781+
# Delete the tag (local and remote)
782+
git tag -d v2.1.9
783+
git push origin :refs/tags/v2.1.9
784+
785+
# Create the release again
786+
mise run release v2.1.9
787+
```
788+

mise.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,21 @@ mise --env tls run proxy:down
666666
"""
667667

668668
[tasks.release]
669-
description = "Publish release artifacts"
670-
depends = ["release:docker"]
669+
description = "Create a GitHub release"
670+
run = """
671+
#!/usr/bin/env bash
672+
set -euo pipefail
673+
674+
VERSION="${1:?Version required, e.g., mise run release v2.1.9}"
675+
676+
echo "Creating release $VERSION..."
677+
678+
git tag "$VERSION"
679+
git push origin "$VERSION"
680+
gh release create "$VERSION" --generate-notes
681+
682+
echo "Done! Release workflow will run automatically."
683+
"""
671684

672685
[tasks."release:docker"]
673686
description = "Release a Docker image for cipherstash-proxy"

0 commit comments

Comments
 (0)