{"id":21896746,"url":"https://github.com/the-gophers/matrix-builds","last_synced_at":"2026-05-15T13:33:16.120Z","repository":{"id":56338577,"uuid":"310970311","full_name":"the-gophers/matrix-builds","owner":"the-gophers","description":"Template illustrating the use of matrix builds and Go's ability to easily target multiple arch / platforms","archived":false,"fork":false,"pushed_at":"2020-11-13T14:33:56.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-06T06:44:44.288Z","etag":null,"topics":["actions","golang","gophercon","multiarch","multiplatform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-gophers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-08T02:28:00.000Z","updated_at":"2024-01-22T14:41:48.000Z","dependencies_parsed_at":"2022-08-15T16:50:52.407Z","dependency_job_id":null,"html_url":"https://github.com/the-gophers/matrix-builds","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/the-gophers/matrix-builds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gophers%2Fmatrix-builds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gophers%2Fmatrix-builds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gophers%2Fmatrix-builds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gophers%2Fmatrix-builds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-gophers","download_url":"https://codeload.github.com/the-gophers/matrix-builds/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gophers%2Fmatrix-builds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33068483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","golang","gophercon","multiarch","multiplatform"],"created_at":"2024-11-28T14:12:01.785Z","updated_at":"2026-05-15T13:33:16.093Z","avatar_url":"https://github.com/the-gophers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Building, Testing and Releasing for Multiple Platforms\nTemplate illustrating the use of matrix builds and Go's ability to easily target multiple arch / platforms.\nIn this example you will learn about resources for verifying your software across multiple platforms and\narchitectures concurrently, how to properly inject version information into Go binaries via a release\nworkflow, and how to create an automated release with artifacts spanning multiple platforms and architectures.\n\n## Getting Started\nThis is a GitHub template repo, so when you click \"Use this template\", it will create a new copy of this \ntemplate in your org or personal repo of choice. Once you have created a repo from this template, you \nshould be able to clone and navigate to the root of the repository.\n\n### First Build\nFrom the root of your repo, you should be able to run the following to build and test the Go action.\n```shell script\n$ make\n$ ./bin/gophers version\n```\n\n### What's in Here?\nA command line application which we will add some functionality.\n```shell script\n.\n├── cmd\n│   ├── add.go\n│   ├── root.go\n│   └── version.go\n├── .github\n│   └── workflows\n│       ├── ci.yml\n│       └── release.yml\n├── .gitignore\n├── go.mod\n├── go.sum\n├── LICENSE\n├── main.go\n├── Makefile\n├── README.md\n├── scripts\n│   └── go_install.sh\n└── xcobra\n    ├── context.go\n    ├── exit_handler.go\n    └── noop_handler.go\n\n```\n\n#### [cmd](./cmd)\nContains the commands for the CLI application.\n\n#### [.github/workflows/ci.yml](./.github/workflows/ci.yml)\nContains a continuous integration workflow which targets multiple platforms and multiple versions of Go\nto create a matrix of machines which will be used to verify the application.\n\nWe'll also discuss how to optimize our builds through caching of module dependencies and other little \ntricks.\n\n#### [.github/workflows/release.yml](./.github/workflows/release.yml)\nContains a release workflow which will show how to build release Go applications with a stamped version\nfor a variety of platforms and architectures. We'll also show how to reference a step in a workflow\nto add artifacts to a release.\n\n#### [main.go](./main.go)\nIt's the entrypoint for the CLI application.\n\n#### [Makefile](./Makefile)\nContains a lot of the build foo. Generally, you shouldn't have to change this, but it wouldn't hurt \nto familiarize yourself with the contents.\n\n#### [scripts](./scripts)\nContains a helper to install Go build tools in a tmp dir with an ephemeral Go module. This is nice\nfor when you want to install a build tool, but you don't want to dirty up your go.mod file.\n\n#### [xcobra](./xcobra)\nContains some extra helpers Cobra helpers that make it easier to write responsive CLI applications and\neasier to test too.\n\n## Lab Video\nTODO: record and post the first lab walking through this example\n\n## Contributions\nAlways welcome! Please open a PR or an issue, and remember to follow the [Gopher Code of Conduct](https://www.gophercon.com/page/1475132/code-of-conduct).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-gophers%2Fmatrix-builds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-gophers%2Fmatrix-builds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-gophers%2Fmatrix-builds/lists"}