add test build

This commit is contained in:
Florian Forster 2019-11-15 14:31:34 +01:00
parent 41cf7deb96
commit 2449f3fc40
No known key found for this signature in database
GPG key ID: B03784B4B09FB794
2 changed files with 14 additions and 4 deletions

View file

@ -4,6 +4,19 @@ on:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
go: ['1.11', '1.12', '1.13']
name: Go ${{ matrix.go }} sample
steps:
- uses: actions/checkout@master
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- run: go run main.go
release:
runs-on: ubuntu-18.04
steps:
@ -13,10 +26,7 @@ jobs:
fetch-depth: 1
- name: Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export GIT_TAG="v$(npx semantic-release --dry-run --plugins=@semantic-release/commit-analyzer --analize-commits | grep "The next release version is" | sed -ne 's/.*The\ next\ release\ version\ is\ \([0-9]\+\.[0-9]\+\.[0-9]\+\)$/\1/p')"
[[ "$GIT_TAG" == "v" ]] && echo "Exiting, as no new version needs to be released" && exit 0
echo "Insert Go test & Build Here" ## Insert Go test & Build Here
npx semantic-release

View file

@ -1,4 +1,4 @@
name: Test
name: Test & Build
on: push
jobs:
build: