Skip to content

Commit

Permalink
Support elastic beat release (#23)
Browse files Browse the repository at this point in the history
Support elastic beat release
  • Loading branch information
tuteng authored Jun 25, 2020
1 parent ecff01b commit b20df60
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: elastic beat release by goreleaser

on:
push:
tags:
- '*'

env:
GOPRIVATE: github.com/streamnative

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x

-
name: Create go path directory
env:
GOPATH: /home/runner/work/pulsar-beat-output/pulsar-beat-output/go
run: |
mkdir -p $GOPATH/src/github.com/streamnative/
-
name: Checkout
uses: actions/checkout@v2
with:
path: go/src/github.com/streamnative/pulsar-beat-output

-
name: Unshallow
run: |
mkdir -p go/src/github.com/streamnative/pulsar-beat-output
cd /home/runner/work/pulsar-beat-output/pulsar-beat-output/go/src/github.com/streamnative/pulsar-beat-output &&
git fetch --prune --unshallow
-
name: Run GoReleaser
uses: goreleaser/[email protected]
with:
workdir: /home/runner/work/pulsar-beat-output/pulsar-beat-output/go/src/github.com/streamnative/pulsar-beat-output
version: latest
args: release --rm-dist --release-notes=docs/release-note.md --release-header=docs/release-header.md
env:
GITHUB_TOKEN: ${{ secrets.BEAT_ACCESS_TOKEN }}
GOPATH: /home/runner/work/pulsar-beat-output/pulsar-beat-output/go

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ beat.db
data/*
logs/*

dist
75 changes: 75 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: beat
builds:
-
id: "fielbeat"
binary: filebeat
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- 386
- amd64
main: ./filebeat/filebeat.go
-
id: "auditbeat"
env:
- CGO_ENABLED=0
binary: auditbeat
goos:
- linux
- darwin
goarch:
- 386
- amd64
main: ./auditbeat/auditbeat.go
-
id: "functionbeat"
env:
- CGO_ENABLED=0
binary: functionbeat
goos:
- linux
- darwin
goarch:
- 386
- amd64
main: ./functionbeat/functionbeat.go
-
id: "journalbeat"
env:
- CGO_ENABLED=0
binary: journalbeat
goos:
- linux
- darwin
goarch:
- 386
- amd64
main: ./journalbeat/journalbeat.go
-
id: "winlogbeat"
env:
- CGO_ENABLED=0
binary: winlogbeat
goos:
- linux
- darwin
goarch:
- 386
- amd64
main: ./winlogbeat/winlogbeat.go

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
File renamed without changes.
Empty file added docs/release-header.md
Empty file.
Empty file added docs/release-note.md
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b20df60

Please sign in to comment.