Added tests in github workflows and updated makefile #44
Workflow file for this run
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
name: Build and Release | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
run: | | ||
VERSION=$(grep '^VERSION=' Makefile | awk -F= '{print $2}') | ||
echo "::set-output name=CURRENT_VERSION::$VERSION" | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Build | ||
run: make | ||
- name: Create Release | ||
# Only create a release on push to the main branch | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
uses: softprops/[email protected] | ||
with: | ||
name: Release v${{ steps.get-version.outputs.CURRENT_VERSION }} | ||
tag_name: v${{ steps.get-version.outputs.CURRENT_VERSION }} | ||
draft: true | ||
prerelease: true | ||