Skip to content

Commit

Permalink
Merge pull request #243 from oasisprotocol/jberci/fix/macos
Browse files Browse the repository at this point in the history
Fix USB in macOS releases
  • Loading branch information
jberci authored May 24, 2024
2 parents b1a4a4b + ff31c7f commit 06baa71
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ permissions:
jobs:
goreleaser:
runs-on: ubuntu-latest
container:
image: ghcr.io/goreleaser/goreleaser-cross:v1.22.3
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
55 changes: 49 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,67 @@ before:
- go mod tidy

universal_binaries:
- replace: true
- id: oasis-darwin-universal
ids:
- oasis-darwin-amd64
- oasis-darwin-arm64
replace: true
name_template: oasis

env:
- CGO_ENABLED=1

builds:
- binary: oasis
- &build-common
id: oasis-linux-amd64
binary: oasis
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
goos:
- linux
goarch:
- amd64
flags:
- -trimpath
ldflags:
- -buildid=
- "{{.Env.GOLDFLAGS_VERSION}}"
targets:
- linux_amd64
- darwin_amd64
- darwin_arm64
- <<: *build-common
id: oasis-linux-arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
goos:
- linux
goarch:
- arm64
- <<: *build-common
id: oasis-darwin-amd64
env:
- CC=o64-clang
- CXX=o64-clang++
goos:
- darwin
goarch:
- amd64
- <<: *build-common
id: oasis-darwin-arm64
env:
- CC=oa64-clang
- CXX=oa64-clang++
goos:
- darwin
goarch:
- arm64

archives:
- name_template: "{{replace .ProjectName \" \" \"_\" | tolower}}_{{.Version}}_{{.Os}}_{{.Arch}}"
wrap_in_directory: true
builds:
- oasis-linux-amd64
- oasis-linux-arm64
- oasis-darwin-universal

checksum:
name_template: SHA256SUMS-{{.Version}}.txt
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ lint: $(lint-targets)

# Release.
release-build:
@goreleaser release --rm-dist
@goreleaser release --clean

# Test.
test-targets := test-unit
Expand Down

0 comments on commit 06baa71

Please sign in to comment.