How to Install Golang, Build a CLI App, and Distribute it with Github Actions and HomeBrew

Опубликовано: 01 Ноябрь 2024
на канале: Learn Fast Make Things
7,508
280

Learn to create your own command-line interface (CLI) tool in Golang and automatically distribute it with GitHub Actions, Github Releases, and HomeBrew.

0:00 - Create CLI using Go Cobra
5:18 - Configure GoReleaser
9:40 - Configure Github Actions
11:35 - Setup Github Repos
12:27 - Setup Github Token
13:08 - Setup Secret Variables
13:30 - Tag and Push the code
14:00 - Watch the Github action run
14:30 - Try it out

Step 1: Create a Golang CLI tool using go-cobra. The go-cobra package allows you to easily create a CLI tool in Golang with minimal effort.

Step 2: Setup and review the Goreleaser configuration that houses all the instructions for publishing your CLI tool

Step 3: Setup and configure the GitHub actions configuration file for Goreleaser

Step 4: Create the necessary GitHub repositories to publish your custom CLI and distribute with HomeBrew

Step 5: Setup GitHub personal access tokens and secrets for future steps

Step 6: Push up the code and try it all out.

Link to Article - https://askcloudarchitech.com/posts/t...

Link to Github Repo - https://github.com/askcloudarchitech/...

Homebrew Tap - https://github.com/askcloudarchitech/...

=======================================
I get a lot of questions about my gear so I've created a few lists of the stuff I use. These are affiliate links. If you click and literally buy anything, it helps support the channel! Thank you.

Here's a link to my home office gear: https://kit.co/AskCloudArchitech/my-h...
Here's a link to my youtube "studio" gear: https://kit.co/AskCloudArchitech/yout...
=======================================

My website for written versions of these vids: https://askcloudarchitech.com
==============================================================