Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building and Releasing Golang binaries
Search
Carlos Alexandro Becker
September 21, 2017
Technology
1
2.4k
Building and Releasing Golang binaries
Carlos Alexandro Becker
September 21, 2017
Tweet
Share
More Decks by Carlos Alexandro Becker
See All by Carlos Alexandro Becker
Building GoReleaser - from shell script to paid product
caarlos0
0
4.1k
Serving TUIs over SSH with Go
caarlos0
0
2k
construindo uma carreira com opensource
caarlos0
0
480
Introdução ao GoReleaser
caarlos0
0
1.2k
Intro to GoReleaser
caarlos0
0
1.2k
Intro to GoReleaser
caarlos0
0
1.6k
Gerenciando Projetos OpenSource
caarlos0
0
1.6k
GoReleaser: Lessons Learned (hacktoberfest)
caarlos0
0
2k
GoReleaser: Lessons Learned
caarlos0
0
2.8k
Other Decks in Technology
See All in Technology
生成AIの利用とセキュリティ /gen-ai-and-security
mizutani
1
1.3k
JAWS DAYS 2026 CDP道場 事前説明会 / JAWS DAYS 2026 CDP Dojo briefing document
naospon
0
200
us-east-1 に障害が起きた時に、 ap-northeast-1 にどんな影響があるか 説明できるようになろう!
miu_crescent
PRO
12
3.6k
問い合わせ自動化の技術的挑戦
recruitengineers
PRO
2
170
開発組織の課題解決を加速するための権限委譲 -する側、される側としての向き合い方-
daitasu
5
280
ITインフラの液体冷却
recruitengineers
PRO
2
100
ヘルシーSRE
tk3fftk
2
240
マネージャー版 "提案のレベル" を上げる
konifar
20
13k
【SLO】"多様な期待値" と向き合ってみた
z63d
2
310
自動テストが巻き起こした開発プロセス・チームの変化 / Impact of Automated Testing on Development Cycles and Team Dynamics
codmoninc
2
1.2k
ビズリーチにおける検索・推薦の取り組み / DEIM2026
visional_engineering_and_design
1
110
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.4k
Featured
See All Featured
Designing for Performance
lara
611
70k
Designing for Timeless Needs
cassininazir
0
150
A better future with KSS
kneath
240
18k
Side Projects
sachag
455
43k
Test your architecture with Archunit
thirion
1
2.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
Writing Fast Ruby
sferik
630
63k
We Are The Robots
honzajavorek
0
190
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
890
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
250
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Transcript
BUILDING AND RELEASING GOLANG BINARIES #1 CHANGELOG
TEXT $ WHOAMI ▸ Site Reliability Engineer @ ContaAzul ▸
@caarlos0 on twitter, github, etc ▸ Writing stuff in Go since ~2015
BUILDING AND RELEASING GOLANG BINARIES #1 CHANGELOG
TEXT AGENDA ▸ Building ▸ Releasing ▸ Automation ▸ Questions
BUILDING
BUILDING CROSS-COMPILING GO ▸ Go can build from and to
basically any platform ▸ Statically linked binaries (no deps!!!) ▸ GOOS=windows GOARCH=amd64 go build -o blah_win64 GOOS=linux GOARCH=amd64 go build -o blah_linux64 GOOS=darwin GOARCH=amd64 go build -o blah_darwin64 ...
RELEASING
RELEASING LINUX PACKAGES ▸ DEB and RPM packages ▸ fpm
--a-thousand-params ▸ Snaps ▸ snapcraft --another-thousand-params config.yml
RELEASING HOMEBREW ▸ Homebrew core ▸ Harder to get things
in there: licensing, replicating dependencies into the recipe, etc ▸ brew install mytool ▸ Homebrew taps ▸ brew install caarlos0/tap/mytool
RELEASING DOCKER ▸ FROM scratch COPY mybin / ENTRYPOINT ["/mybin"]
▸ docker build -t user/img:tag . ▸ docker tag user/img:tag user/img:latest ▸ docker push user/img:tag ▸ docker push user/img:latest
RELEASING GITHUB RELEASES ▸ git tag && git push ▸
Upload artifacts ▸ Generate and upload checksums maybe ▸ Edit the release notes
"THE PROCESS"
TEXT RELEASING MY GO APP THE FIRST TIME: ▸ Tag
▸ Cross compile ▸ Checksums ▸ Release notes ▸ .deb, .rpm, .snap ▸ docker images ▸ Upload ▸ Update homebrew tap
HMM, THAT'S ACTUALLY NOT THAT BAD! Carlos Becker TEXT
TEXT RELEASING MY GO APP FOR THE 10TH TIME: ▸
Tag ▸ Cross compile ▸ Checksums ▸ Release notes ▸ .deb, .rpm, .snap ▸ docker images ▸ Upload ▸ Update homebrew tap
None
None
None
None
... Carlos Becker TEXT
None
None
AUTOMATION INTENSIFIES
TEXT ./RELEASE.SH ▸ Copy-paste all the commands in one file
▸ chmod +x ▸ ./release.sh
TEXT ./RELEASE.SH ▸ No parallelism ▸ Every repo has its
own release.sh ▸ GNU vs BSD coreutils aka "Works on my machine" ▸ Random deps or really hacky scripts
None
GORELEASER INTRODUCING
GORELEASER FEATURES ▸ Checks git state ▸ Changelog between tags
▸ Builds for several platforms ▸ Archiving (tar.gz, zip) ▸ FPM, Snapcraft and Docker integration ▸ Homebrew taps ▸ Checksums ▸ Snapshots ▸ Fairly customisable
GORELEASER INIT ▸ goreleaser init ▸ vim .goreleaser.yml ▸ git
add .goreleaser.yml ▸ git commit -m 'goreleaser setup!'
GORELEASER RELEASE PROCESS ▸ git tag x.y.z ▸ git push
x.y.z ▸ goreleaser
GORELEASER CI INTEGRATION ▸ after_success: test -n "$TRAVIS_TAG" && curl
-fsL https://git.io/goreleaser | bash ▸ Push the tag ▸ Drink some coffee
None
None
HOW IT WORKS
None
None
None
None
GORELEASER WHY BOTHER ▸ Easy release process ▸ More releases
▸ Smaller changes ▸ Reproducible releases ▸ Fewer and more traceable bugs ▸ Same process across multiple repos ▸ Focus on your code
STATS
"THATS NICE, BUT NO ONE WILL GIVE A CRAP ABOUT
IT ANYWAY..." Carlos Becker TEXT
Generated with caarlos0/starcharts
Generated with goreleaser/users
THANKS!
QUESTIONS?
GORELEASER LINKS ▸ https://goreleaser.com ▸ #goreleaser on https://gophers.slack.com ▸ https://github.com/goreleaser/goreleaser
▸ https://github.com/goreleaser/users ▸ https://github.com/caarlos0/starcharts ▸ https://brew.sh ▸ http://snapcraft.io ▸ https://github.com/jordansissel/fpm