add test build
This commit is contained in:
parent
41cf7deb96
commit
2449f3fc40
2 changed files with 14 additions and 4 deletions
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
|
@ -4,6 +4,19 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
jobs:
|
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:
|
release:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
|
@ -13,10 +26,7 @@ jobs:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Release
|
- name: Release
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
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')"
|
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
|
[[ "$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
|
npx semantic-release
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Test
|
name: Test & Build
|
||||||
on: push
|
on: push
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue