Skip to content

Commit

Permalink
Create release workflow
Browse files Browse the repository at this point in the history
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
manishmeganathan committed Jul 20, 2021
1 parent d20bf45 commit eb674c7
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit eb674c7

Please sign in to comment.