Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GoReleaser and build for other OSs #111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
@@ -1,6 +1,24 @@
name: build
on: [push, pull_request]
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ^1
cache: true
check-latest: true
- uses: goreleaser/goreleaser-action@v4
with:
version: latest
distribution: goreleaser
args: release --rm-dist --snapshot --skip-sign --skip-sbom

build:
strategy:
matrix:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,31 @@
name: release

on:
push:
tags:
- v*.*.*

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ^1
cache: true
check-latest: true
- uses: goreleaser/goreleaser-action@v4
with:
version: latest
distribution: goreleaser
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -13,3 +13,6 @@

# Dependency directories (remove the comment below to include it)
# vendor/

# GoReleaser
dist
47 changes: 47 additions & 0 deletions .goreleaser.yaml
@@ -0,0 +1,47 @@
before:
hooks: ['go mod tidy']
builds:
- no_main_check: true
goos:
- windows
- darwin
- linux
- solaris
- dragonfly
- freebsd
- netbsd
- openbsd
- plan9
- js
- aix
changelog:
sort: asc
use: github
filters:
exclude:
- '^test:'
- '^chore'
- 'merge conflict'
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: Dependency updates
regexp: "^.*feat\\(deps\\)*:+.*$"
order: 300
- title: 'New Features'
regexp: "^.*feat[(\\w)]*:+.*$"
order: 100
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 200
- title: 'Documentation updates'
regexp: "^.*docs[(\\w)]*:+.*$"
order: 400
- title: Other work
order: 9999
release:
skip_upload: true

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json