From 3be654da17db37b15dacd9f56451b68b2c838003 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 3 May 2026 21:52:14 +0200 Subject: [PATCH] chore(build): add -trimpath to GitHub workflow build commands Consistent with the Makefile which already applies -trimpath globally. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edff657..e0ff48e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,7 +112,7 @@ jobs: if [ "${{ matrix.goos }}" = "windows" ]; then output_name="${output_name}.exe" fi - go build -o "$output_name" ./cmd/soundtouch-cli + go build -trimpath -ldflags="-s -w" -o "$output_name" ./cmd/soundtouch-cli - name: Upload build artifacts uses: actions/upload-artifact@v7 @@ -220,7 +220,7 @@ jobs: - name: Test CLI build and help run: | - go build -o soundtouch-cli ./cmd/soundtouch-cli + go build -trimpath -ldflags="-s -w" -o soundtouch-cli ./cmd/soundtouch-cli ./soundtouch-cli -help - name: Test library imports diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ad78e9..31974e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,6 +151,7 @@ jobs: rm -f "$OUTPUT_NAME" "$OUTPUT_NAME.sha256" "$OUTPUT_NAME.sha512" if ! go build \ + -trimpath \ -ldflags="-s -w" \ -o "$OUTPUT_NAME" \ "$CMD_PATH"; then