Skip to content

Commit

Permalink
WIP: Test version check
Browse files Browse the repository at this point in the history
  • Loading branch information
HGSilveri committed Jul 27, 2022
1 parent 09d9ded commit b295172
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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: |
echo 'old_version="$(head -1 VERSION.txt)"' >> $GITHUB_ENV
echo "Old version: $old_version"
- name: Check out head branch
uses: actions/checkout@v3
- name: Get new version
run: |
echo 'new_version="$(head -1 VERSION.txt)"' >> $GITHUB_ENV
echo "New version: $new_version"
- name: Compare versions
run: dpkg --compare-versions "${{ env.old_version }}" lt "${{ env.new_version }}"
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0.dev
0.6.1.dev

0 comments on commit b295172

Please sign in to comment.