Example: Add complete workflow configuration example (multi-platform build: windows darwin linux)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- github-actions, go
- Domain
- ci-cd, documentation
Research direction
Start with the gorelease.yaml configuration in the issue and the ./cmd/desktop/main.go entry point; inspect how the repository's GitHub Actions workflow invokes the GoReleaser action. Add a complete workflow example covering Windows, macOS, and Linux, then verify that the cross-platform build no longer fails because the compiler is missing.
Written by the indexing model from the issue text.
Description
The current example only has the. gorelease.yaml part, and there is no corresponding workflow configuration. When I compile mac, it will prompt that the compiler does not exist.
Here is the build config I'm using:
- id: desktop
binary: golang-cross
env:
- CGO_ENABLED=1
- >-
{{- if eq .Os "darwin" }}
{{- if eq .Arch "amd64"}}CC=o64-clang{{- end }}
{{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }}
{{- end }}
{{- if eq .Os "windows" }}
{{- if eq .Arch "amd64" }}CC=x86_64-w64-mingw32-gcc{{- end }}
{{- if eq .Arch "arm64" }}CC=/llvm-mingw/bin/aarch64-w64-mingw32-gcc{{- end }}
{{- if eq .Arch "386" }}CC=i686-w64-mingw32-gcc{{- end }}
{{- end }}
- >-
{{- if eq .Os "darwin" }}
{{- if eq .Arch "amd64"}}CXX=o64-clang++{{- end }}
{{- if eq .Arch "arm64"}}CX=clang++{{- end }}
{{- end }}
{{- if eq .Os "windows" }}
{{- if eq .Arch "amd64" }}CXX=x86_64-w64-mingw32-g++{{- end }}
{{- if eq .Arch "arm64" }}CXX=/llvm-mingw/bin/aarch64-w64-mingw32-g++{{- end }}
{{- if eq .Arch "386" }}CXX=i686-w64-mingw32-g++{{- end }}
{{- end }}
goos:
- darwin
- windows
main: ./cmd/desktop/main.go
The error log is as follows:
⨯ release failed after 2m35s
error=
│ build failed: exit status 1: # runtime/cgo
│ cgo: C compiler "o64-clang" not found: exec: "o64-clang": executable file not found in $PATH
target=darwin_amd64_v1
Error: The process '/opt/hostedtoolcache/goreleaser-action/2.8.2/x64/goreleaser' failed with exit code 1
- Dominant language
- Go
- Stars
- 43
- Forks
- 8
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rohitgollarahalli/mcpx#45 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
router-for-me/CLIProxyAPI#8851 ·
Maintainers usually reply within 7 days
-
Mend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Windows 主机
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Lee-xeo/Claude-Cage#1550 ·
Maintainers usually reply within 1 day