goreleasemefromthisprision #15
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: Build and Upload Artifact | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- 'release' # replace with your default branch if not 'main' | |
jobs: | |
build: | |
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.21 # replace with your Go version | |
- name: Build | |
run: go build -v -o tailtrail | |
- name: GoReleaser Action | |
uses: goreleaser/goreleaser-action@v5.0.0 | |
with: | |
# either 'goreleaser' (default) or 'goreleaser-pro' | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |