added goreleaser config

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-04-29 14:27:59 -07:00
parent 2099381abd
commit 959f865dda
3 changed files with 32 additions and 0 deletions

View File

@ -13,6 +13,8 @@ jobs:
steps: steps:
- name: Check out - name: Check out
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v1 uses: actions/setup-go@v1

26
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Release
on:
push:
tags:
- v*
jobs:
goreleaser:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}

View File

@ -8,6 +8,10 @@ builds:
- env: - env:
- CGO_ENABLED=0 - CGO_ENABLED=0
main: ./cmd/dagger main: ./cmd/dagger
binary: dagger
ldflags:
- -s -w
- -X dagger.io/go/cmd/dagger/cmd.version={{.Version}}
goos: goos:
- linux - linux
- windows - windows