Skip to content

Instantly share code, notes, and snippets.

@wheelercj
Created January 11, 2024 21:00
Show Gist options
  • Save wheelercj/98494ed2ac18f121daa91d56199d34b6 to your computer and use it in GitHub Desktop.
Save wheelercj/98494ed2ac18f121daa91d56199d34b6 to your computer and use it in GitHub Desktop.
GoReleaser GitHub Action -- don't forget to delete the Go patch version from go.mod
name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
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