Skip to content

Commit

Permalink
Update workflow to use goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomascogez committed Jun 23, 2022
1 parent ccad0c8 commit 804a9b0
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
name: Release Go project

on:
release:
types: [created]
push:
tags:
- "*"

jobs:
releases-matrix:
name: Release Go Binary
build:
name: GoReleaser build
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows

steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.29
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: "dump-dumper"
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.14
id: go

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 804a9b0

Please sign in to comment.