Skip to content

Commit

Permalink
Add Github Actions workflow (#112)
Browse files Browse the repository at this point in the history
* Add Github Actions workflow
---

*Motivation*

Using Github Actions to release the binary and create a release note draft

* Address comments

Co-Authored-By: Sijie Guo <[email protected]>
  • Loading branch information
zymap and sijie authored Oct 24, 2019
1 parent e7d7cde commit a5503de
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
template: |
## What's changed
$CHANGES
17 changes: 17 additions & 0 deletions .github/workflows/release-note.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: release note
uses: toolmantim/release-drafter@master
env:
GITHUB_TOKEN: ${{ secrets.TEST_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release

on:
release:

jobs:
upload:
name: Upload go build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.12
id: go

- name: build
run: |
version=`cat VERSION`
go build -ldflags "-X github.com/streamnative/pulsarctl/pkg/pulsar.ReleaseVersion=Pulsarctl-Go-$version" .
- name: publish
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'pulsarctl'
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.1.0

0 comments on commit a5503de

Please sign in to comment.