From 5b2affec8db614024324decda98a782c650f52c2 Mon Sep 17 00:00:00 2001 From: s1d3sw1ped_bot <12+s1d3sw1ped_bot@git.s1d3sw1ped.com> Date: Wed, 2 Sep 2026 02:23:24 +0000 Subject: [PATCH] ci: Bump tag-release golangci-lint to v8 --- .gitea/workflows/tag-release.yaml | 13 +++++--- .golangci.yml | 49 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 .golangci.yml diff --git a/.gitea/workflows/tag-release.yaml b/.gitea/workflows/tag-release.yaml index 246782c..2a2816c 100644 --- a/.gitea/workflows/tag-release.yaml +++ b/.gitea/workflows/tag-release.yaml @@ -28,9 +28,10 @@ jobs: run: go mod tidy - name: Lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v8 with: - version: latest + version: v2.13.2 + args: --timeout=5m test: name: Test @@ -64,7 +65,10 @@ jobs: release: name: Build versioned release + needs: [lint, test] runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -116,9 +120,10 @@ jobs: name: swiped-mod-switcher-${{github.ref_name}}-${{github.run_number}} path: bin/ + # Prefer built-in job token (Eva): gitea-release-action@v1 defaults to + # github.token / GITEA_TOKEN — no RELEASE_TOKEN / GIT_PACKAGES_TOKEN. - name: Release binaries - uses: https://gitea.com/actions/release-action@main + uses: https://gitea.com/actions/gitea-release-action@v1 with: files: |- bin/** - api_key: '${{secrets.RELEASE_TOKEN}}' diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..cc77230 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,49 @@ +# .golangci.yml — SwipedModSwitcher (golangci-lint v2) +# Adapted from steamcache2 v2 skeleton; no project-specific path excludes yet. +# Run with: golangci-lint run ./... +version: "2" + +run: + timeout: 5m + modules-download-mode: readonly + +linters: + # Defaults (errcheck, govet, ineffassign, staticcheck, unused, …) plus: + enable: + - misspell + settings: + errcheck: + check-type-assertions: false + check-blank: false + staticcheck: + checks: + - all + - "-ST*" + - "-QF*" + govet: + enable-all: true + disable: + - fieldalignment + - shadow + exclusions: + generated: lax + paths: + - dist + - bin + rules: + - path: _test\.go + linters: + - errcheck + +formatters: + enable: + - goimports + exclusions: + generated: lax + paths: + - dist + - bin + +issues: + max-issues-per-linter: 0 + max-same-issues: 0