Add GitHub Action for GoReleaser #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # Trigger the workflow on version tags | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.16' # Set the Go version as needed | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Install GoReleaser | |
run: | | |
curl -sSL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh | |
- name: Run GoReleaser | |
run: goreleaser release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This is automatically provided by GitHub Actions |