dongyan4424 2015-08-05 10:53
浏览 255
已采纳

为Github构建Golang发布二进制文件

I'm looking for ideas on how to easily build binaries for common platforms for a Golang project, for release on Github.

I already know how to manually do releases, using Github's instructions at Creating Releases. And I'm currently doing releases using aktau/github-release, but this requires manually logging into different machines (OSX, Linux, Windows) and doing the release.

Benedikt Lang has blogged about using Travis-CI (which I'm yet to experiment with). But I presume the public Travis will only build binaries for Linux.

Any suggestions?

  • 写回答

3条回答 默认 最新

  • dsy48837 2015-08-06 05:42
    关注

    Thanks for all the suggestions and answers that were given. Cross-compilation was what I was looking for, and Dave Cheney's blog post was a good start.

    However I found a better solution - laher/goxc - "a build tool for Go, with a focus on cross-compiling, packaging and deployment". It was inspired by Dave Cheney's work, and also includes deploy tools for Github - just what I was looking for. (For example, I used it to release soniah/awsenv)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵