Skip to content

Use GoReleaser to build binaries #36

Use GoReleaser to build binaries

Use GoReleaser to build binaries #36

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml: (Line: 48, Col: 13, Idx: 1303) - (Line: 48, Col: 14, Idx: 1304): While parsing a tag, did not find expected tag URI.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
tags:
- v*
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
pull-requests: read
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-and-test:
runs-on: ubuntu-20.04
name: Build and Test
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '^1.18.8' # The Go version to download (if necessary) and use.
- name: Install Build Dependencies
run: make get-build-deps
- name: Download required modules
run: make download
- name: Vet
run: make vet
- name: Lint
run: make lint
- name: Cover
run: make cover
- name: Build
uses: goreleaser/goreleaser-action@v4
if: ! startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: build --snapshot --clean
- name: Release
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}