Skip to content

Commit fb67560

Browse files
committed
fix: enable macOS keychain support in Homebrew builds
Split goreleaser builds: darwin with CGO=1 (native keychain), linux/windows with CGO=0. Release workflow now runs on macos-latest.
1 parent e8a67e5 commit fb67560

2 files changed

Lines changed: 25 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
release:
1313
name: Release
14-
runs-on: ubuntu-latest
14+
runs-on: macos-latest
1515
steps:
1616
- uses: actions/checkout@v4
1717
with:

.goreleaser.yaml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,40 @@ version: 2
22
project_name: strawpoll
33

44
builds:
5-
- main: ./cmd/strawpoll
5+
- id: strawpoll
6+
main: ./cmd/strawpoll
67
binary: strawpoll
78
env:
89
- CGO_ENABLED=0
9-
goos:
10-
- darwin
11-
- linux
12-
- windows
13-
goarch:
14-
- amd64
15-
- arm64
16-
ignore:
17-
- goos: windows
18-
goarch: arm64
10+
targets:
11+
- linux_amd64
12+
- linux_arm64
13+
- windows_amd64
14+
ldflags:
15+
- -s -w
16+
- -X github.com/dedene/strawpoll-cli/internal/cmd.version={{ .Tag }}
17+
- -X github.com/dedene/strawpoll-cli/internal/cmd.commit={{ .ShortCommit }}
18+
- -X github.com/dedene/strawpoll-cli/internal/cmd.date={{ .Date }}
19+
20+
- id: strawpoll_darwin
21+
main: ./cmd/strawpoll
22+
binary: strawpoll
23+
env:
24+
- CGO_ENABLED=1
25+
targets:
26+
- darwin_amd64
27+
- darwin_arm64
1928
ldflags:
2029
- -s -w
2130
- -X github.com/dedene/strawpoll-cli/internal/cmd.version={{ .Tag }}
2231
- -X github.com/dedene/strawpoll-cli/internal/cmd.commit={{ .ShortCommit }}
2332
- -X github.com/dedene/strawpoll-cli/internal/cmd.date={{ .Date }}
2433

2534
archives:
26-
- formats:
35+
- ids:
36+
- strawpoll
37+
- strawpoll_darwin
38+
formats:
2739
- tar.gz
2840
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
2941
format_overrides:

0 commit comments

Comments
 (0)