175 lines
4.5 KiB
YAML
175 lines
4.5 KiB
YAML
# GoReleaser config: https://goreleaser.com
|
|
version: 2
|
|
|
|
project_name: free-turn-proxy
|
|
|
|
before:
|
|
hooks:
|
|
- go mod download
|
|
|
|
builds:
|
|
# Standard client/server builds — pure Go, no CGO.
|
|
- id: client
|
|
main: ./cmd/client
|
|
binary: client
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -checklinkname=0 -X main.version={{.Version}}
|
|
env:
|
|
- CGO_ENABLED=0
|
|
targets:
|
|
- linux_amd64
|
|
- linux_arm64
|
|
- linux_386
|
|
- linux_arm_7
|
|
- linux_mipsle_softfloat
|
|
- linux_mips_softfloat
|
|
- linux_mips64le_softfloat
|
|
- linux_riscv64
|
|
- darwin_amd64
|
|
- darwin_arm64
|
|
- windows_amd64
|
|
- windows_arm64
|
|
- windows_386
|
|
- freebsd_amd64
|
|
|
|
- id: server
|
|
main: ./cmd/server
|
|
binary: server
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -checklinkname=0 -X main.version={{.Version}}
|
|
env:
|
|
- CGO_ENABLED=0
|
|
targets:
|
|
- linux_amd64
|
|
- linux_arm64
|
|
- linux_386
|
|
- linux_arm_7
|
|
- linux_mipsle_softfloat
|
|
- linux_mips_softfloat
|
|
- linux_mips64le_softfloat
|
|
- linux_riscv64
|
|
- darwin_amd64
|
|
- darwin_arm64
|
|
- windows_amd64
|
|
- windows_arm64
|
|
- windows_386
|
|
- freebsd_amd64
|
|
|
|
# Android client only. Pure Go (CGO=0), для standalone-запуска в Termux.
|
|
- id: client-android
|
|
main: ./cmd/client
|
|
binary: client
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -checklinkname=0 -X main.version={{.Version}}
|
|
env:
|
|
- CGO_ENABLED=0
|
|
targets:
|
|
- android_arm64
|
|
|
|
archives:
|
|
# Raw, stable-named binaries (no version in filename) so docs and scripts
|
|
# can fetch /releases/latest/download/<binary>-<os>-<arch> directly without
|
|
# unpacking a tarball. Shipped uncompressed — no tar.gz/zip archives.
|
|
- id: raw
|
|
ids:
|
|
- client
|
|
- server
|
|
formats: [binary]
|
|
name_template: >-
|
|
{{ .Binary }}-{{ .Os }}-{{ .Arch }}
|
|
{{- with .Arm }}v{{ . }}{{ end }}
|
|
{{- with .Mips }}-{{ . }}{{ end }}
|
|
|
|
# Android client как raw-бинарь со стабильным именем - для Termux
|
|
- id: raw-android
|
|
ids:
|
|
- client-android
|
|
formats: [binary]
|
|
name_template: "client-{{ .Os }}-{{ .Arch }}"
|
|
|
|
checksum:
|
|
name_template: checksums.txt
|
|
# Mobile artifacts and install.sh ship via release.extra_files and are not build outputs;
|
|
# list them here so hosts (Android Gradle fetch) can verify what they download.
|
|
extra_files:
|
|
- glob: '{{ if not .IsSnapshot }}mobile-dist/freeturn.aar{{ end }}'
|
|
- glob: '{{ if not .IsSnapshot }}mobile-dist/freeturn-sources.jar{{ end }}'
|
|
- glob: '{{ if not .IsSnapshot }}mobile-dist/Mobile.xcframework.zip{{ end }}'
|
|
- glob: scripts/install.sh
|
|
|
|
sboms:
|
|
- artifacts: archive
|
|
|
|
snapshot:
|
|
version_template: "{{ incpatch .Version }}-snapshot-{{ .ShortCommit }}"
|
|
|
|
changelog:
|
|
use: github
|
|
sort: asc
|
|
groups:
|
|
- title: "Breaking Changes"
|
|
regexp: '^.*?break(\(.+?\))??!?:.+$'
|
|
order: 0
|
|
- title: "Features"
|
|
regexp: '^.*?feat(\(.+?\))??!?:.+$'
|
|
order: 10
|
|
- title: "Bug Fixes"
|
|
regexp: '^.*?fix(\(.+?\))??!?:.+$'
|
|
order: 20
|
|
- title: "Performance"
|
|
regexp: '^.*?perf(\(.+?\))??!?:.+$'
|
|
order: 30
|
|
- title: "Refactoring"
|
|
regexp: '^.*?refactor(\(.+?\))??!?:.+$'
|
|
order: 40
|
|
- title: "Other"
|
|
order: 999
|
|
filters:
|
|
exclude:
|
|
- '^docs:'
|
|
- '^test:'
|
|
- '^chore:'
|
|
- '^ci:'
|
|
- '^style:'
|
|
- 'Merge pull request'
|
|
- 'Merge branch'
|
|
|
|
release:
|
|
prerelease: auto
|
|
mode: replace
|
|
draft: false
|
|
name_template: "{{ .ProjectName }} {{ .Version }}"
|
|
extra_files:
|
|
- glob: '{{ if not .IsSnapshot }}mobile-dist/freeturn.aar{{ end }}'
|
|
- glob: '{{ if not .IsSnapshot }}mobile-dist/freeturn-sources.jar{{ end }}'
|
|
- glob: '{{ if not .IsSnapshot }}mobile-dist/Mobile.xcframework.zip{{ end }}'
|
|
# Android-приложение стримит этот скрипт по SSH: версия RPC = версия релиза.
|
|
- glob: scripts/install.sh
|
|
|
|
dockers_v2:
|
|
- id: server
|
|
ids:
|
|
- server
|
|
dockerfile: Dockerfile.goreleaser
|
|
images:
|
|
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}"
|
|
tags:
|
|
- "{{ .Version }}"
|
|
- '{{ if not .Prerelease }}latest{{ end }}'
|
|
platforms:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
labels:
|
|
org.opencontainers.image.source: "https://github.com/{{ .Env.GITHUB_REPOSITORY }}"
|
|
org.opencontainers.image.version: "{{ .Version }}"
|
|
org.opencontainers.image.revision: "{{ .FullCommit }}"
|
|
org.opencontainers.image.created: "{{ .Date }}"
|
|
extra_files:
|
|
- docker/entrypoint.sh
|