Skip to content

Commit

Permalink
update goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjdsh committed Feb 11, 2022
1 parent cfb8a4b commit 9a02086
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 25 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: goreleaser

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
-
name: Build
run: go build
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
64 changes: 39 additions & 25 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
# Build customization
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- binary: manssh
- env:
- CGO_ENABLED=0
main: ./cmd/manssh
goos:
- darwin
- linux
goarch:
- amd64

brew:
github:
owner: xwjdsh
name: homebrew-tap

commit_author:
name: Wendell Sun
email: iwendellsun@gmail.com

homepage: "https://github.com/xwjdsh/manssh"
description: "Manage your ssh alias configs easily"

install: |
bin.install "manssh"
release:
github:
owner: xwjdsh
name: manssh
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
- tap:
owner: xwjdsh
name: homebrew-tap
commit_author:
name: Wendell Sun
email: iwendellsun@gmail.com
homepage: "https://github.com/xwjdsh/manssh"
description: "Manage your ssh alias configs easily"
license: "MIT"
install: |
bin.install "manssh"

0 comments on commit 9a02086

Please sign in to comment.