Skip to content

Commit

Permalink
add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
utahta committed Feb 11, 2020
1 parent ea19c02 commit 2a8dd7b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
project_name: pythonbrew
env:
- GO111MODULE=on
before:
hooks:
- go mod tidy
builds:
-
main: ./cmd/pythonbrew/pythonbrew.go
binary: pythonbrew
flags: -trimpath
ldflags:
- -s -w
- -X github.com/utahta/pythonbrew/subcmd.Version={{.Version}}
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- freebsd
- windows
archives:
-
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
release:
prerelease: auto

0 comments on commit 2a8dd7b

Please sign in to comment.