Implement auto-semver for releases
This commit is contained in:
parent
4940f3b222
commit
84b6b4932b
2 changed files with 41 additions and 0 deletions
11
.bumpversion.cfg
Normal file
11
.bumpversion.cfg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[bumpversion]
|
||||||
|
current_version = 0.0.0
|
||||||
|
commit = False
|
||||||
|
tag = True
|
||||||
|
tag_name = {new_version}
|
||||||
|
|
||||||
|
[semver]
|
||||||
|
main_branches = master
|
||||||
|
major_branches =
|
||||||
|
minor_branches = feature
|
||||||
|
patch_branches = hotfix, bugfix
|
30
.github/workflows/version.yml
vendored
Normal file
30
.github/workflows/version.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
name: Version & Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
CheckVersion:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: rightbrainnetworks/auto-semver
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Run Auto-Semver
|
||||||
|
id: semver
|
||||||
|
uses: RightBrain-Networks/semver-action@1.0.0
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
if: steps['semver']['outputs']['RETURN_STATUS'] == '0'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||||
|
release_name: ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||||
|
body: Release Version ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
Reference in a new issue