add ci file

This commit is contained in:
Florian Forster 2019-11-15 14:15:37 +01:00
parent 26bd873f4e
commit 97f8ac76c4
No known key found for this signature in database
GPG key ID: B03784B4B09FB794

19
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: Release
on: push
jobs:
release:
runs-on: ubuntu-18.04
steps:
- name: Source checkout
uses: actions/checkout@v1
with:
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