Skip to content

Instantly share code, notes, and snippets.

@gmorse81
Created February 20, 2022 20:39
Show Gist options
  • Save gmorse81/7ad16674c5693740495e39ea6b23ea47 to your computer and use it in GitHub Desktop.
Save gmorse81/7ad16674c5693740495e39ea6b23ea47 to your computer and use it in GitHub Desktop.
Github actions workflow to run goreleaser on tag push.
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.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }}
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment