From 01b64c4640c78b8bf2e0f061322b243483050d6d Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 30 Mar 2022 10:03:02 +0100 Subject: [PATCH] Add check-version to branch workflow (#8) --- .github/workflows/react-lint-testing.yml | 20 +++++++++++++++++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/react-lint-testing.yml b/.github/workflows/react-lint-testing.yml index 0f93ac8..b792ade 100644 --- a/.github/workflows/react-lint-testing.yml +++ b/.github/workflows/react-lint-testing.yml @@ -29,4 +29,22 @@ jobs: run: | echo "Tags: $TAGS" env: - TAGS: ${{ github.event.inputs.tags }} \ No newline at end of file + TAGS: ${{ github.event.inputs.tags }} + + check-version: + name: 'Check version' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - run: git fetch --depth=1 --tags origin + - name: Install yq + run: sudo snap install yq + - name: Check Build Version + id: get_version + run: ./scripts/check-version.sh + shell: bash + - name: Error if version is not increased + shell: bash + run: | + exit $([[ "${{steps.get_version.outputs.IS_NEW_VERSION}}" = "true" ]] && echo 0 || echo 1) diff --git a/package-lock.json b/package-lock.json index d8168ca..e328e22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "veritable-verifier", - "version": "0.2.3", + "version": "0.2.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "veritable-verifier", - "version": "0.2.3", + "version": "0.2.4", "license": "Apache-2.0", "dependencies": { "@testing-library/jest-dom": "^5.14.1", diff --git a/package.json b/package.json index 98f5a70..cff5a90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "veritable-verifier", - "version": "0.2.3", + "version": "0.2.4", "description": "Front-end for Veritable verifiers", "author": "Digital Catapult (https://www.digicatapult.org.uk/)", "license": "Apache-2.0",