Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Release
# Conventional Commits since the last tag. A bump commits the new version
# (.cz.toml, mise.toml pins, CHANGELOG.md) and pushes it with a `vX.Y.Z` tag.
# Commits that release nothing (docs, ci, chore, ...) leave main untouched.
# A new tag gets a GitHub release with every `mise run dist` binary attached.
#
# The push uses a token minted from a GitHub App, so it can get past branch
# protection and triggers workflows for the bump commit. The App's client ID is
Expand All @@ -21,6 +22,11 @@ concurrency:
group: release
cancel-in-progress: false

# The toolchain comes from mise.toml, as in ci.yml.
env:
MISE_EXEC_AUTO_INSTALL: 'false'
MISE_TASK_RUN_AUTO_INSTALL: 'false'

jobs:
ci:
uses: ./.github/workflows/ci.yml
Expand Down Expand Up @@ -71,3 +77,31 @@ jobs:
with:
name: release-notes
path: release-notes.md

release:
needs: bump
if: ${{ needs.bump.outputs.tag != '' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ needs.bump.outputs.tag }}
fetch-depth: 0 # tags for `git describe` in the version ldflags
- uses: jdx/mise-action@v5
with:
version: 2026.10.18
install_args: go golangci-lint
- run: mise run dist
- name: Checksums
working-directory: dist
run: sha256sum -- * > SHA256SUMS
- uses: actions/download-artifact@v8
with:
name: release-notes
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ needs.bump.outputs.tag }}
run: gh release create "$TAG" dist/* --title "$TAG" --notes-file release-notes.md --verify-tag
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ This covers every command of gh-stack v0.2.1. Every command takes `--provider` (
git-stack is five binaries: `git-stack` itself and one plugin per provider, `git-stack-github`, `git-stack-gitlab`,
`git-stack-bitbucket` and `git-stack-ado`. Install the providers you need next to `git-stack` or anywhere on your `PATH`.

1. Install the binaries (requires Go, see [Development](#development)):
1. Download the binaries for your platform from the
[latest release](https://github.com/mhvelplund/git-stack/releases/latest), named `<name>-<os>-<arch>`, rename
each to `<name>` (`<name>.exe` on Windows), make them executable and put them on your `PATH`. `SHA256SUMS` lists
their checksums. Or install them with Go (see [Development](#development)):

```sh
go install github.com/mhvelplund/git-stack/cmd/git-stack@latest
Expand Down Expand Up @@ -235,6 +238,15 @@ mise run dist # cross-compile for Windows, Linux and macOS into dist/

To try a build, put `bin/` first on your `PATH` and run `git stack` in any repository.

Releases are automatic. Commit messages follow [Conventional Commits](https://www.conventionalcommits.org) (a
commit-msg hook checks them). On every push to `main`, the Release workflow runs CI and then
[commitizen](https://commitizen-tools.github.io/commitizen/): `feat` commits bump the minor version, `fix` and
`perf` the patch version and breaking changes (`feat!:` or a `BREAKING CHANGE:` footer) the major version. A bump
updates `.cz.toml`, the git-stack pins in `mise.toml` and `CHANGELOG.md`, tags `vX.Y.Z` and publishes a GitHub
release with the `mise run dist` binaries. The workflow pushes with a token from a GitHub App with read and write
access to the repository contents: set its client ID as the `RELEASE_APP_CLIENT_ID` Actions variable and its
private key as the `RELEASE_APP_PRIVATE_KEY` Actions secret.

## License

MIT. See [LICENSE](LICENSE). Contains work derived from gh-stack, Copyright GitHub, Inc.
Loading