Merge pull request #1 from josephbmanley/pipeline/semver

Intergrate with semver action
This commit is contained in:
Layla 2020-01-31 19:59:19 -05:00 committed by GitHub
commit 7776e05517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 20 deletions

View File

@ -14,12 +14,10 @@ jobs:
with:
python-version: 3.7
- name: Update Version
run: |
pip install bumpversion
export regex="([0-9]+.[0-9]+.[0-9]+)"
echo ${{ github.ref }} > tag.txt
VERSION=`grep -Po "${regex}" tag.txt`
bumpversion minor --no-tag --new-version ${VERSION}
id: semver
uses: RightBrain-Networks/semver-action@1.0.0
with:
mode: get
- name: Install dependencies
run: |
python -m pip install --upgrade pip

View File

@ -8,24 +8,12 @@ on:
jobs:
CheckVersion:
runs-on: ubuntu-latest
container:
image: rightbrainnetworks/auto-semver
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Run auto-semver
- 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
uses: RightBrain-Networks/semver-action@1.0.0
- name: Create Release
id: create_release
uses: actions/create-release@v1