From e047ed5793aa090b715c188624130781e06b3c22 Mon Sep 17 00:00:00 2001 From: Jakob Schluse Date: Wed, 4 Sep 2024 19:36:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Create=20a=20workflow=20which=20?= =?UTF-8?q?checks=20if=20the=20version=20got=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script works thanks Github Copilot, so it should better work on Github, right? RIGHT??? --- .github/workflows/version_bump_check.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/version_bump_check.yml diff --git a/.github/workflows/version_bump_check.yml b/.github/workflows/version_bump_check.yml new file mode 100644 index 0000000..6387fd1 --- /dev/null +++ b/.github/workflows/version_bump_check.yml @@ -0,0 +1,26 @@ +name: Ensure Version Update + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + version-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Check for version update + run: | + if git diff HEAD^ HEAD --exit-code -- library.json; then + echo "Version not updated in library.json" + exit 1 + else + echo "Version updated in library.json" + fi