Skip to content

Commit

Permalink
goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jun 5, 2023
1 parent 58a9088 commit 94fa988
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 36 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4.0.1
with:
go-version: 1.19

- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 0 additions & 34 deletions .github/workflows/tag.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ jobs:

steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4.0.1
with:
go-version: 1.17.x
go-version: 1.19

- name: Checkout code
uses: actions/checkout@v3.3.0

- name: Test
run: |
go test ./... -coverprofile=profile.cov
- uses: shogo82148/actions-goveralls@v1.6.0
with:
path-to-profile: profile.cov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/mtdb
19 changes: 19 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
targets:
- linux_amd64
- linux_arm_6
- windows_amd64
- darwin_arm64
ldflags:
- -s -w
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit 94fa988

Please sign in to comment.