From e07664c641f017fca384a0dd8bac0f76828491fb Mon Sep 17 00:00:00 2001 From: Cano Date: Sat, 2 Mar 2024 17:13:14 +0900 Subject: [PATCH] homebrew releaser --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ .goreleaser.yaml | 29 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..14c95aa --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..fe15809 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,29 @@ +version: 1 + +before: + hooks: + - go mod tidy + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - format: tar.gz + format_overrides: + - goos: windows + format: zip + +brews: + - repository: + owner: canoypa + name: homebrew-tap + token: '{{ .Env.HOMEBREW_TAP_TOKEN }}' + folder: Formula + homepage: 'https://github.com/canoypa/mi' + description: 'CLI tool for compose notes to Misskey' + license: MIT