-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #5 - Created file release.yml as github workflow - Triggered on push of a new version tag - Cross-compiles binaries for multiple platforms and creates a github release with the build artifacts and release documentation
- Loading branch information
1 parent
d20bf45
commit eb674c7
Showing
1 changed file
with
41 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,41 @@ | ||
# Workflow Name | ||
name: GitHub Release | ||
|
||
# Workflow Triggers | ||
on: | ||
# Triggered on push of a new version tag | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
# Workflow Jobs | ||
jobs: | ||
build-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout Git Repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
# Set Tag Environment Variable | ||
- name: Set Tag Environment Value | ||
run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
# Setup Go on runner | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
|
||
# Cross-Compile Binaries for all platforms | ||
- name: Cross-Compile Binaries | ||
run: make build-all | ||
|
||
# Create GitHub Release | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: "Tunalang ${{ env.TAG_VERSION }}" | ||
bodyFile: "RELEASE.md" | ||
artifacts: "bin/*" | ||
token: ${{ secrets.GITHUB_TOKEN }} |