From 30b87409820381a8d51f401b10001d78c838b071 Mon Sep 17 00:00:00 2001 From: f1zm0 Date: Fri, 31 Mar 2023 18:23:57 +0200 Subject: [PATCH] ci: add github action for autorelease and golangci file --- .github/workflows/release.yml | 35 ++++++++++++++++++++++++++++ .golangci.yml | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .golangci.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c267f21 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release + +on: + push: + branches: + - main + - release + +jobs: + release-please: + runs-on: ubuntu-latest + permissions: + contents: write # to create release commit + pull-requests: write # to create release PR + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: go + package-name: actions-testing + changelog-types: > + [ + { "type": "build", "section": "Build System", "hidden": false }, + { "type": "ci", "section": "Continuous Integration", "hidden": false }, + { "type": "chore", "section": "Misc", "hidden": false }, + { "type": "docs", "section": "Documentation", "hidden": false }, + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "perf", "section": "Performance Improvements", "hidden": false }, + { "type": "revert", "section": "Reverts", "hidden": false }, + { "type": "refactor", "section": "Code Refactoring", "hidden": false }, + { "type": "style", "section": "Styles", "hidden": false }, + { "type": "test", "section": "Tests", "hidden": false } + ] diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..39ddad5 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,44 @@ +skip-dirs: + - dist + - data +issues: + exclude-use-default: false +output: + format: colored-line-number +linters: + disable-all: true + enable: + - asciicheck + - bidichk + - decorder + - durationcheck + - errcheck + - errname + - goconst + - gocyclo + - godot + - godox + - gofumpt + - goimports + - gosec + - gosimple + - govet + - ineffassign + - lll + - misspell + - nakedret + - revive + - staticcheck + - typecheck + - unconvert + - unused +linters-settings: + gofumpt: + lang-version: "1.18" + extra-rules: true + godox: + keywords: + - FIXME + lll: + line-length: 140 + tab-width: 1