add ci file
This commit is contained in:
parent
26bd873f4e
commit
97f8ac76c4
1 changed files with 19 additions and 0 deletions
19
.github/workflows/release.yml
vendored
Normal file
19
.github/workflows/release.yml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue