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 fa05558
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
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 fa05558

Please sign in to comment.