Skip to content

Commit

Permalink
chore(ci): release rpaasv2 plugin with goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
nettoclaudio committed Mar 25, 2020
1 parent 53a0135 commit a093664
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- uses: actions/setup-go@v1
with:
go-version: 1.14.x
- uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

38 changes: 38 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
builds:
- id: rpaasv2
main: ./cmd/plugin/rpaasv2/main.go
binary: rpaasv2
ldflags:
- -s -w -X "github.com/tsuru/rpaas-operator/version.Version={{ .Tag }}/{{ .ShortCommit }}"
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
- amd64
- 386
ignore:
- goos: darwin
goarch: 386

archives:
- id: rpaasv2
builds:
- rpaasv2
name_template: "rpaasv2_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- LICENSE

checksum:
name_template: "checksums.txt"

0 comments on commit a093664

Please sign in to comment.