glitch-in-the-system/.github/workflows/version.yml
Joseph Manley 0e4cbcd31d auto-semver intergration
if if

Container

Build via matrix

Update version & build

Fix

Fix

Fix

Fix

Update
2019-12-20 23:09:55 -05:00

41 lines
1.2 KiB
YAML

name: Version & Release
on:
push:
branches:
- develop
jobs:
CheckVersion:
runs-on: ubuntu-latest
container:
image: rightbrainnetworks/auto-semver
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Run auto-semver
id: semver
run: |
export regex='^\\s*current_version\\s*=\\s*\\K[^\\s]+'
export RETURN_STATUS=`semver -n`
echo "Semver Return Status: ${RETURN_STATUS}"
export SEMVER_NEW_VERSION=`grep -Po '${regex}' .bumpversion.cfg`
export VERSION=`semver_get_version -d`
echo ::set-output name=RETURN_STATUS::$RETURN_STATUS
echo ::set-output name=SEMVER_NEW_VERSION::$SEMVER_NEW_VERSION
echo ::set-output name=VERSION::$VERSION
- 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: v${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
release_name: v${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
body: |
Glitch In The System v${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
draft: false
prerelease: false