Skip to content

Commit

Permalink
Merge pull request #68 from jesmg/master
Browse files Browse the repository at this point in the history
Add github action based on goreleaser to release binaries
  • Loading branch information
06kellyjac authored Nov 15, 2019
2 parents 9e90cc7 + b7b8c88 commit c3c5d4c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
create:
tags:
- v*.*.*

jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
steps:
- name: Set up GO
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: set up dep
run: |
export GOBIN=${GOROOT}/bin
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- name: Set GOPATH
run: |
echo "##[set-env name=GOPATH;]$(dirname `pwd`)"
echo "##[add-path]$(dirname `pwd`)/bin"
shell: bash
- name: Check out code
uses: actions/checkout@v1
with:
path: src/github.com/controlplaneio/kubesec/
- name: Launch goreleaser
uses: goreleaser/goreleaser-action@master
with:
args: release --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 9 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ builds:
- linux
goarch:
- amd64
env:
- CGO_ENABLED=0
- 386
ignore:
- goos: darwin
goarch: 386
env:
- CGO_ENABLED=0

checksum:
name_template: '{{ .ProjectName }}_checksums.txt'

archive:
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'

snapshot:
name_template: "{{ .Tag }}-next"
name_template: "{{ .Tag }}-next"

0 comments on commit c3c5d4c

Please sign in to comment.