Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
chore(ci): Adding gh workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tckb committed Nov 12, 2021
1 parent 6f5c275 commit d93444b
Show file tree
Hide file tree
Showing 5 changed files with 868 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: lint
on:
pull_request:
branches:
- master
jobs:
Lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.1
only-new-issues: true
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
push:
tags:
- '*'
branches:
- master

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: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release
env:
GITHUB_TOKEN: ${{ secrets.FYAYC_GITHUB_TOKEN }}
57 changes: 57 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
run:
concurrency: 4
timeout: 1m
issues-exit-code: 1
tests: true

output:
format: colored-line-number

linters-settings:
lll:
line-length: 150

errcheck:
check-type-assertions: false
check-blank: true

staticcheck:
go: "1.16"
checks: [ "all" ]

stylecheck:
go: "1.16"

unused:
go: "1.16"

wsl:
allow-cuddle-declarations: true
allow-trailing-comment: true

issues:
fix: true
new: true
exclude-rules:
- linters:
- lll
source: ".*(Summary|Detail|Description).*"


linters:
enable:
- megacheck
- govet
- gofmt
- revive
- exportloopref
- typecheck
- stylecheck
- unconvert
- whitespace
- prealloc
- unparam
- unused
- wsl
- lll
fast: false
27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
Loading

0 comments on commit d93444b

Please sign in to comment.