High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
add GoReleaser: compressed archives, checksums, version flag, auto changelog
L265680398e38
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex c9cabdbb..76aa19bd 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -61,42 +61,24 @@ jobs:version: v2.9.0release:- name: Release Binaries+ name: Releaseif: startsWith(github.ref, 'refs/tags/v')needs: [build, lint]runs-on: ubuntu-latestpermissions:contents: write- strategy:- matrix:- include:- - goos: linux- goarch: amd64- - goos: linux- goarch: arm64- - goos: darwin- goarch: amd64- - goos: darwin- goarch: arm64- - goos: windows- goarch: amd64steps:- uses: actions/checkout@v4+ with:+ fetch-depth: 0- uses: actions/setup-go@v5with:go-version: '1.25'- - name: Build- env:- GOOS: ${{ matrix.goos }}- GOARCH: ${{ matrix.goarch }}- run: |- EXT=""- if [ "$GOOS" = "windows" ]; then EXT=".exe"; fi- go build -ldflags="-s -w" -o "pinchtab-${GOOS}-${GOARCH}${EXT}" .-- - name: Upload to release- uses: softprops/action-gh-release@v2+ - uses: goreleaser/goreleaser-action@v6with:- files: pinchtab-*+ version: latest+ args: release --clean+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}diff --git a/.goreleaser.yml b/.goreleaser.ymlnew file mode 100644index 00000000..47a354e9--- /dev/null+++ b/.goreleaser.yml@@ -0,0 +1,34 @@+version: 2++builds:+ - ldflags:+ - -s -w -X main.version={{.Version}}+ goos:+ - linux+ - darwin+ - windows+ goarch:+ - amd64+ - arm64++archives:+ - format_overrides:+ - goos: windows+ format: zip+ name_template: "pinchtab-{{.Os}}-{{.Arch}}"++checksum:+ name_template: checksums.txt++changelog:+ sort: asc+ filters:+ exclude:+ - '^docs:'+ - '^ci:'+ - '^chore:'++release:+ github:+ owner: luigi-agosti+ name: pinchtabdiff --git a/main.go b/main.goindex a94c2143..8450f63c 100644--- a/main.go+++ b/main.go@@ -2,6 +2,7 @@ package mainimport ("context"+ "fmt""log/slog""net/http""os"@@ -12,9 +13,17 @@ import ("github.com/chromedp/chromedp")+// version is set by goreleaser via ldflags+var version = "dev"+var bridge Bridgefunc main() {+ if len(os.Args) > 1 && (os.Args[1] == "--version" || os.Args[1] == "-v") {+ fmt.Printf("pinchtab %s\n", version)+ os.Exit(0)+ }+if err := os.MkdirAll(stateDir, 0755); err != nil {slog.Error("cannot create state dir", "err", err)os.Exit(1)