diff --git a/.goreleaser.yml b/.goreleaser.yml index e4082a2..3ce2b05 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,23 +2,21 @@ version: 2 project_name: cloudstic -builds_common: &builds_common - main: ./cmd/cloudstic - binary: cloudstic - ldflags: - - -s -w - - -X main.version={{.Version}} - - -X main.commit={{.ShortCommit}} - - -X main.date={{.Date}} - - -X github.com/cloudstic/cli/pkg/source.defaultGoogleClientID={{ .Env.GOOGLE_CLIENT_ID }} - - -X github.com/cloudstic/cli/pkg/source.defaultGoogleClientSecret={{ .Env.GOOGLE_CLIENT_SECRET }} - - -X github.com/cloudstic/cli/pkg/source.defaultOneDriveClientID={{ .Env.ONEDRIVE_CLIENT_ID }} - builds: - - id: cloudstic-cross - <<: *builds_common + - &cloudstic_build_common + id: cloudstic-cross + main: ./cmd/cloudstic + binary: cloudstic env: - CGO_ENABLED=0 + ldflags: + - -s -w + - -X main.version={{.Version}} + - -X main.commit={{.ShortCommit}} + - -X main.date={{.Date}} + - -X github.com/cloudstic/cli/pkg/source.defaultGoogleClientID={{ .Env.GOOGLE_CLIENT_ID }} + - -X github.com/cloudstic/cli/pkg/source.defaultGoogleClientSecret={{ .Env.GOOGLE_CLIENT_SECRET }} + - -X github.com/cloudstic/cli/pkg/source.defaultOneDriveClientID={{ .Env.ONEDRIVE_CLIENT_ID }} goos: - linux - windows @@ -26,7 +24,7 @@ builds: - amd64 - arm64 - id: cloudstic-darwin - <<: *builds_common + <<: *cloudstic_build_common env: - CGO_ENABLED=1 goos: