Code Monkey home page Code Monkey logo

makerelease's Introduction

☕️ makerelease

Use this repository to build a macOS (x64) compatible binary, then release it on both GitHub and Homebrew.

Prerequisites

Install the goreleaser command by running:

$ brew install goreleaser/tap/goreleaser
Updating Homebrew...

Use in Existing Projects

❗️If it's your first time releasing a Go application on Homebrew, you are strongly encouraged to fully complete the Step by Step Guide as written. You'll gain the experience required to release your own Go programs on Homebrew.

  1. In the root of your Go project, run the following command to copy the .goreleeaser.yml file to the root of your repo:

    curl https://raw.githubusercontent.com/Make-School-Labs/makerelease/master/.goreleaser.yml > .goreleaser.yml
  2. Follow the Step by Step Guide below, replacing hellohomebrew with the name of your project.

Step by Step Guide

This quick start guide is based on the guide found on GoReleaser.com, modified for brevity and relevance to BEW 2.5.

Step 1: Repository Setup

  1. Create a new GitHub repository named homebrew-hellohomebrew exactly.

  2. (Skip for Existing Projects)
    Import a GitHub repository and match this screenshot exactly:

  3. Create a valid GitHub token with the repo scope. It will be used to deploy releases to your GitHub repository on your behalf. Save the token in a safe place. You'll need it later.

  4. Open your terminal and follow the steps below.

Step 2: In Your Terminal

  1. Clone your repository locally and cd hellohomebrew:

    $ git clone https://github.com/GITHUB_USERNAME/hellohomebrew
  2. Create a new module by running:

    $ go mod init github.com/GITHUB_USERNAME/hellohomebrew
  3. Open .goreleaser.yml and change GITHUB_USERNAME to your GitHub username.

  4. GoReleaser will use the latest Git tag of your repository. Create a tag and push it to GitHub:

    $ git tag -a v1.0.0 -m "First release"
    $ git push origin v1.0.0
  5. Test GoReleaser before doing a real release. This command only builds and packages your code:

    $ goreleaser release --skip-publish --rm-dist --snapshot
  6. If it worked, run GoReleaser at the root of your repository:

    $ export GITHUB_TOKEN=YOUR_GITHUB_TOKEN
    $ goreleaser release --rm-dist

Step 3: Install and Test

  1. Install your program from Homebrew:

    $ brew install GITHUB_USERNAME/hellohomebrew/hellohomebrew
  2. Time to see if it works! Run the command to test:

    $ hellohomebrew
    🍺   Hello from Homebrew!   🍺

makerelease's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.