Skip to content

Build release

Build release #13

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Build release
on:
release:
types:
- created
- edited
permissions:
contents: write
packages: write
jobs:
gorelease:
strategy:
matrix:
osvariant: [ { imgname: ubuntu-latest, goarch: linux }, { imgname: macos-latest, goarch: darwin } ]
runs-on: ${{ matrix.osvariant.imgname }}
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
go-version: '1.21.x'
-
name: Set up Go
uses: actions/setup-go@v4
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean --config .goreleaser-${{ matrix.osvariant.goarch }}.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}