Files
free-turn-proxy-orig/.github/workflows/ci.yml
T
samosvalishe 3ee9087323 ci: переезд на Task + GoReleaser + Release Please
- Taskfile.yml: build/test/lint/fmt/vuln/ci/tools, единая точка входа
- .goreleaser.yaml: 13 целевых платформ + Android .so + GHCR multi-arch образы
- release-please: автогенерация PR с CHANGELOG и тегов из conventional commits
- Dockerfile.goreleaser: тонкий alpine-runtime, бинарь подкладывает GoReleaser
  (старый multistage Dockerfile удалён)
- ci.yml: разнесён на lint/test/vuln/build-snapshot, версии actions запинены,
  добавлены concurrency и env-блок
- release.yml: 345 строк matrix-сборок сведены к запуску goreleaser на tag push
- golangci-lint v1.65.0 (несуществующая) → v2.12.2; путь /v2/cmd/, action
  v6.1.1 → v9.2.1
- cmd/{client,server}: var version для -ldflags -X main.version, лог версии
  при старте
- удалены: .github/workflows/issues.yml, docs/build.md (устарела после Task)
2026-05-23 00:25:57 +03:00

111 lines
2.4 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
GO_VERSION: "1.25.0"
GOLANGCI_VERSION: v2.12.2
GOVULN_VERSION: v1.1.4
GORELEASER_VERSION: v2.5.0
TASK_VERSION: v3.40.0
jobs:
lint:
name: Lint & format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.1.0
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- uses: arduino/setup-task@v2.0.0
with:
version: ${{ env.TASK_VERSION }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Format check
run: task fmt:check
- name: Vet
run: task vet
- uses: golangci/golangci-lint-action@v9.2.1
with:
version: ${{ env.GOLANGCI_VERSION }}
args: --timeout=5m ./...
test:
name: Test (race)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.1.0
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- uses: arduino/setup-task@v2.0.0
with:
version: ${{ env.TASK_VERSION }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: task test
vuln:
name: govulncheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.1.0
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@${{ env.GOVULN_VERSION }}
- run: govulncheck ./...
build-snapshot:
name: Snapshot build (all targets)
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-go@v5.1.0
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- uses: goreleaser/goreleaser-action@v6.1.0
with:
distribution: goreleaser
version: ${{ env.GORELEASER_VERSION }}
args: release --snapshot --clean --skip=publish,sign,docker,announce
- uses: actions/upload-artifact@v4.4.3
with:
name: snapshot-dist
path: dist/
retention-days: 7