From b6342d43c63221b9694827300ce808489502dff1 Mon Sep 17 00:00:00 2001 From: Mafuyu Soga <44225659+s-dwinter@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:48:36 +0900 Subject: [PATCH] Enable brew installation (#12) * Enable brew installation Fixes #3 --- .github/workflows/ci.yml | 1 + .goreleaser.yaml | 15 +++++++++++++++ README.md | 13 ++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 799fa30..801db68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,3 +25,4 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.github_token }} + DEPLOY_PRIVATE_KEY: ${{ secrets.deploy_private_key }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4fb5cc0..9cab71d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -34,6 +34,21 @@ archives: - goos: windows format: zip +brews: + - homepage: https://github.com/dwango/yashiro + description: A tool to manage template files with external stores. + license: "Apache-2.0" + skip_upload: auto + extra_install: | + generate_completions_from_executable(bin/"{{ .ProjectName }}", "completion", base_name: "{{ .ProjectName }}") + test: | + version_output = shell_output("#{bin}/{{ .ProjectName }} version") + assert_match "{{ .Version }}", version_output + repository: + git: + url: "git@github.com:dwango/homebrew-yashiro.git" + private_key: "{{ .Env.DEPLOY_PRIVATE_KEY }}" + checksum: name_template: "checksums.txt" diff --git a/README.md b/README.md index f7a1095..b8a346c 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,21 @@ go get github.com/dwango/yashiro ## CLI Tool -### Install +### Installation + +#### From release page Download binary from [release page](https://github.com/dwango/yashiro/releases). +#### Homebrew Users + +Download and install by homebrew. + +```sh +brew tap dwango/yashiro +brew install ysr +``` + ### Example See [example](./example/).