add sematic-release

This commit is contained in:
Florian Forster 2019-11-15 15:33:35 +01:00
parent fd677e9d4a
commit 5c17919330
No known key found for this signature in database
GPG key ID: B03784B4B09FB794
3 changed files with 16 additions and 12 deletions

View file

@ -20,13 +20,7 @@ jobs:
release:
runs-on: ubuntu-18.04
steps:
- name: Source checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Release
shell: bash
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
npx semantic-release
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,5 +1,8 @@
name: Test & Build
on: push
on:
push:
branches-ignore:
- master
jobs:
build:
runs-on: ubuntu-18.04

7
releaserc.js Normal file
View file

@ -0,0 +1,7 @@
module.exports = {
branch: 'master',
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator"
]
};