Skip to content

Commit

Permalink
ci(release): add goreleaser workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMarble committed Jan 24, 2022
1 parent c102506 commit cf00b54
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Release a tag"
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Unshallow
run: git fetch --prune --unshallow

- name: Create release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
44 changes: 44 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
project_name: zmk-layout-viewer

before:
hooks:
- go mod tidy

release:
github:
owner: mrmarble
name: zmk-layout-viewer

builds:
- binary: zmk-layout-viewer
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
main: ./cmd/zmk-layout-viewer

archives:
- format: tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}'
files:
- LICENSE
- README.md

checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'

snapshot:
name_template: SNAPSHOT-{{ .Commit }}

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit cf00b54

Please sign in to comment.