From d5ca00ba5b9064b5b1f6e54c18d8a2d7b6cc4f52 Mon Sep 17 00:00:00 2001 From: Marques Johansson Date: Wed, 12 Aug 2020 19:09:55 -0400 Subject: [PATCH] run goreleaser when tags are pushed to github --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ RELEASE.md | 13 +++++-------- 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..2971a558 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/RELEASE.md b/RELEASE.md index 87cae62f..e962bd65 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,16 +17,13 @@ When breaking changes are introduced bump the minor or major accordingly, restti ## Releasing -Install goreleaser +Push the tag to GitHub and [GitHub Workflows](.github/workflows/release.yml) and [GoReleaser](.goreleaser.yml) will do the rest. -Run: - -``` -export GITHUB_TOKEN=... -goreleaser +```sh +git push origin --tags 0.0.9 ``` -This will build and push binaries for several different OS and Architecture combinations. +This will build and release binaries for several different OS and Architecture combinations. -Any special instructions or notes can be entered by editing the release notes at https://github.com/packethost/packet-cli/releases +Any special instructions or notes should be added by editing the release notes that goreleaser publishes. These notes can be found at https://github.com/packethost/packet-cli/releases