Skip to content

Commit

Permalink
ACTIONS: Add release workflow and goreleaser configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Dec 18, 2021
1 parent a4db40b commit 865d5bb
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Go Setup
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Run Release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
50 changes: 50 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
before:
hooks:
- go mod download
builds:
-
main: cmd/main.go
ldflags:
- -s -w
- -X main.Version={{ .Version }}
- -X main.Build={{ .Commit }}
- -X main.BuildDate={{ .Date }}
archives:
-
id: switchboard
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
nfpms:
-
replacements:
amd64: 64-bit
386: 32-bit
darwin: macOS
linux: linux
vendor: Cian911
formats:
- deb
- rpm
brews:
- tap:
owner: Cian911
name: homebrew-switchboard
folder: Formula
homepage: https://github.com/Cian911/switchboard
description: |
TBD

0 comments on commit 865d5bb

Please sign in to comment.