diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cab88c..acdd8d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 64beabf..bf1d4db 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -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