From fa05558113ce92354cb3f6bdba543e61b9bc4f03 Mon Sep 17 00:00:00 2001 From: HGSilveri Date: Wed, 27 Jul 2022 11:17:14 +0200 Subject: [PATCH] WIP: Test version check --- .github/workflows/version.yml | 30 ++++++++++++++++++++++++++++++ VERSION.txt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/version.yml diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml new file mode 100644 index 000000000..5bf649157 --- /dev/null +++ b/.github/workflows/version.yml @@ -0,0 +1,30 @@ +name: version + +on: + pull_request: + paths: + - 'VERSION.txt' + +jobs: + compare-versions: + runs-on: ubuntu-latest + steps: + - name: Check out base branch + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.base.ref }} + - name: Get old version + run: | + old_version="$(head -1 VERSION.txt)" + echo "Old version: $old_version" + echo "old_version=$old_version" >> $GITHUB_ENV + + - name: Check out head branch + uses: actions/checkout@v3 + - name: Get new version + run: | + new_version="$(head -1 VERSION.txt)" + echo "New version: $new_version" + echo "new_version=$new_version" >> $GITHUB_ENV + - name: Compare versions + run: dpkg --compare-versions "${{ env.old_version }}" lt "${{ env.new_version }}" diff --git a/VERSION.txt b/VERSION.txt index b8aacd3fb..6ba3ede19 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.6.0.dev +0.6.1.dev