From 0f328f49203285be8f0a515b834f69a16a3609c0 Mon Sep 17 00:00:00 2001 From: "Ronny.Herrgesell" Date: Mon, 25 May 2026 18:37:47 +0200 Subject: [PATCH 1/2] chore: add MIT license and GoReleaser release automation - Add MIT license (2026, Ronny Herrgesell) - Add .goreleaser.yaml for cross-compiled releases (linux/darwin, amd64/arm64) - Add release.yml workflow (triggers on v* tags via GoReleaser) - Update ci.yml: replace release trigger with push-to-main - Update README: add badges, link to releases for installation --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ .goreleaser.yaml | 22 ++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 9 ++++++++- 5 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yaml create mode 100644 LICENSE diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4984d37..e3e05e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,8 +2,8 @@ name: CI on: pull_request: - release: - types: [published] + push: + branches: [main] jobs: test-dash: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4baa398 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +on: + push: + tags: ["v*"] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: actions/setup-go@v6 + with: + go-version: "1.26" + - uses: goreleaser/goreleaser-action@v6 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..9a05c82 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,22 @@ +version: 2 + +builds: + - main: ./cmd/clitest/ + binary: clitest + ldflags: + - -s -w -X main.version={{.Version}} + goos: + - linux + - darwin + goarch: + - amd64 + - arm64 + +archives: + - formats: [tar.gz] + +checksum: + name_template: checksums.txt + +release: + prerelease: auto diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a947a8c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Ronny Herrgesell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 5f06d6f..e6d4ec1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # CLI-Testing — Declarative Test Runner for Shell Commands +[![CI](https://github.com/sleipi/cli-t/actions/workflows/ci.yml/badge.svg)](https://github.com/sleipi/cli-t/actions/workflows/ci.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) + **Stop writing fragile bash scripts to test your CLI tools.** Write what you expect, and let CLI-Testing do the rest. CLI-Testing is a single-binary, zero-dependency test runner for shell commands. You describe your expected outputs in simple, readable `.clitest` files — no test framework, no scripting, no boilerplate. If your tool runs in a terminal, CLI-Testing can test it. @@ -62,6 +65,10 @@ You read it, you understand it, your teammates understand it. Done. ## Installation +Download a pre-built binary from the [latest release](https://github.com/sleipi/cli-t/releases/latest), extract it, and place it in your `$PATH`. + +Or install via `go install`: + ```bash go install github.com/sleipi/cli-t/cmd/clitest@latest ``` @@ -147,4 +154,4 @@ See [SPEC.md](SPEC.md) for the complete syntax reference. ## License -MIT +[MIT](LICENSE) From d044e7c8d090067d6c6ff72ee7f655033ff3b9d1 Mon Sep 17 00:00:00 2001 From: "Ronny.Herrgesell" Date: Mon, 25 May 2026 19:06:05 +0200 Subject: [PATCH 2/2] chore: add Homebrew tap publishing to GoReleaser Configure GoReleaser to auto-push formula to sleipi/homebrew-tap on non-prerelease tags. Requires HOMEBREW_TAP_TOKEN secret. Closes #31 --- .github/workflows/release.yml | 1 + .goreleaser.yaml | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4baa398..67fda8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,3 +23,4 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 9a05c82..ed2a855 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -18,5 +18,19 @@ archives: checksum: name_template: checksums.txt +brews: + - repository: + owner: sleipi + name: homebrew-tap + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + directory: Formula + homepage: https://github.com/sleipi/cli-t + description: "Declarative CLI testing tool" + license: MIT + install: | + bin.install "clitest" + test: | + assert_match version.to_s, shell_output("#{bin}/clitest --version") + release: prerelease: auto