Skip to content

Instantly share code, notes, and snippets.

@caarlos0
Created July 21, 2021 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caarlos0/b57d2c0bf311eacfd9d92dafe255336b to your computer and use it in GitHub Desktop.
Save caarlos0/b57d2c0bf311eacfd9d92dafe255336b to your computer and use it in GitHub Desktop.
name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: write
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.16
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: caarlos0
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment