Skip to content

Commit

Permalink
Add goreleaser homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-leschinsky committed Nov 11, 2024
1 parent 5e6e0aa commit 3f26b18
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
fetch-depth: 0

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.2.0
uses: goreleaser/goreleaser-action@v2
with:
version: "~> v1"
version: "~> v3"
args: release --clean
env:
GITHUB_TOKEN: ${{ github.token }}
108 changes: 95 additions & 13 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,106 @@
---
env:
- CGO_ENABLED=0

version: 2
before:
hooks:
- go mod download

build:
binary: taketo-{{ .Os }}-{{ .Arch }}
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm
- arm64
goarm:
- 7
builds:
- binary: taketo-{{ .Os }}-{{ .Arch }}
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm
- arm64
goarm:
- "7"

brews:
- name: taketo-go
goarm: 7

url_template: "https://github.com/ivan-leschinsky/taketo-go/releases/download/{{ .Tag }}/{{ .ArtifactName }}"

download_strategy: NoUnzipCurlDownloadStrategy

# Git author used to commit to the repository.
commit_author:
name: goreleaserbot
email: [email protected]

commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"

# Directory inside the repository to put the formula.
directory: Formula
homepage: "https://github.com/ivan-leschinsky/taketo-go"

description: "A tiny helper utility to make access to servers eaiser for different projects and environments."
license: "MIT"

# Setting this will prevent goreleaser to actually try to commit the updated
# formula - instead, the formula file will be stored on the dist directory
# only, leaving the responsibility of publishing it to the user.
# If set to auto, the release will not be uploaded to the homebrew tap
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
#
# Templates: allowed.
skip_upload: auto

repository:
owner: ivan-leschinsky
name: taketo-go

# Optionally a branch can be provided.
#
# Default: default repository branch.
# Templates: allowed.
# branch: main
branch: homebrew

# Sets up pull request creation instead of just pushing to the given branch.
# Make sure the 'branch' property is different from base before enabling
# it.
#
# This might require a personal access token.
pull_request:
# Whether to enable it or not.
enabled: true

# Whether to open the PR as a draft or not.
draft: true

# Clone, create the file, commit and push, to a regular Git repository.
#
# Notice that this will only have any effect if the given URL is not
# empty.
git:
# The Git URL to push.
#
# Templates: allowed.
url: "ssh://[email protected]:ivan-leschinsky/taketo-go.git"

# The SSH private key that should be used to commit to the Git
# repository.
# This can either be a path or the key contents.
#
# IMPORTANT: the key must not be password-protected.
#
# WARNING: do not expose your private key in the configuration file!
#
# Templates: allowed.
private_key: "{{ .Env.PRIVATE_KEY_DEPLOY }}"

# The value to be passed to `GIT_SSH_COMMAND`.
# This is mainly used to specify the SSH private key used to pull/push
# to the Git URL.
#
# Default: 'ssh -i {{ .KeyPath }} -o StrictHostKeyChecking=accept-new -F /dev/null'.
# Templates: allowed.
#
archives:
- name_template: "taketo-{{ .Os }}-{{ .Arch }}"
format: binary
Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# taketo-go
# taketo-go ![Version](https://img.shields.io/badge/v-0.0.9-green)
![Go version](https://img.shields.io/badge/go-1.17-lightblue)
![Go version](https://img.shields.io/badge/go-1.18-blue)
[![Unit Tests](https://github.com/ivan-leschinsky/taketo-go/actions/workflows/test.yml/badge.svg)](https://github.com/ivan-leschinsky/taketo-go/actions/workflows/test.yml)

Simplified version of https://github.com/ivan-leschinsky/taketo ruby gem written in go


### Run in development:
### Install with homebrew on macOS

```sh
go mod download
go run . server_alias_here
brew tap ivan-leschinsky/taketo-go
brew info ivan-leschinsky/taketo-go/taketo-go
brew install ivan-leschinsky/taketo-go/taketo-go
```

### Install from source
Expand All @@ -20,9 +21,20 @@ go mod download
go install
```

### Download from releases
Go to the releases and download version for your platform: https://github.com/ivan-leschinsky/taketo-go/releases/latest

bin will be available here:
`$GOPATH/bin/taketo-go`


### Run in development:

```sh
go mod download
go run . server_alias_here
```

### Run unit tests

```
Expand Down

0 comments on commit 3f26b18

Please sign in to comment.