From 2449f3fc40f1fc43120b98546d3bce0fdd6766d1 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Nov 2019 14:31:34 +0100 Subject: [PATCH] add test build --- .github/workflows/release.yml | 16 +++++++++++++--- .github/workflows/test.yml | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04a374e..0d2192b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70c3322..f5e9c29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test +name: Test & Build on: push jobs: build: