-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support release via GitHub action (#1)
* Support release via GitHub action * Avoid across compile
- Loading branch information
1 parent
e4a2720
commit 36b7900
Showing
5 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter | ||
name-template: 'v$NEXT_PATCH_VERSION 🌈' | ||
tag-template: 'v$NEXT_PATCH_VERSION' | ||
version-template: $MAJOR.$MINOR.$PATCH | ||
# Emoji reference: https://gitmoji.carloscuesta.me/ | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- 'kind/feature' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- 'regression' | ||
- 'kind/bug' | ||
- title: 📝 Documentation updates | ||
labels: | ||
- documentation | ||
- 'kind/doc' | ||
- title: 👻 Maintenance | ||
labels: | ||
- chore | ||
- dependencies | ||
- 'kind/chore' | ||
- 'kind/dep' | ||
- title: 🚦 Tests | ||
labels: | ||
- test | ||
- tests | ||
exclude-labels: | ||
- reverted | ||
- no-changelog | ||
- skip-changelog | ||
- invalid | ||
change-template: '* $TITLE (#$NUMBER) @$AUTHOR' | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Pull Request Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: BuildOnLinux | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Set up Go 1.16 | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
- name: Build | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt install libasound2-dev -y | ||
go build -o bin/goplay . | ||
build-darwin: | ||
name: BuildOnDarwin | ||
runs-on: macos-10.15 | ||
steps: | ||
- name: Set up Go 1.16 | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
- name: Build | ||
run: | | ||
go build -o bin/goplay . | ||
build-win: | ||
name: BuildOnWindows | ||
runs-on: windows-2019 | ||
steps: | ||
- name: Set up Go 1.16 | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
- name: Build | ||
run: | | ||
go build -o bin/goplay . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
UpdateReleaseDraft: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
BuildOnLinux: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Unshallow | ||
run: git fetch --prune --unshallow | ||
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16.x | ||
- name: Build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }} | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt install libasound2-dev -y | ||
GOENABLE=0 go build -o bin/goplay . | ||
cd bin && tar czvf goplay-linux-amd64.tar.gz goplay | ||
gh release upload ${{ github.ref_name }} goplay-linux-amd64.tar.gz | ||
BuildOnDarwin: | ||
runs-on: macos-10.15 | ||
steps: | ||
- name: Set up Go 1.16 | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
- name: Build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }} | ||
run: | | ||
GOENABLE=0 go build -o bin/goplay . | ||
cd bin && tar czvf goplay-darwin-amd64.tar.gz goplay | ||
gh release upload ${{ github.ref_name }} goplay-darwin-amd64.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
goplay | ||
bin/ |