Skip to content

Commit

Permalink
Merge pull request #68 from mlr-org/version-check-yml
Browse files Browse the repository at this point in the history
Create version-check.yml
  • Loading branch information
Raphael Sonabend authored Mar 13, 2021
2 parents ce908a8 + c9bfa44 commit 0a3ac0b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
pull_request:
branches: main

name: Version Check

jobs:
all:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, r: "release" }

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RGL_USE_NULL: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/[email protected]

- name: New version
run: |
echo "NEW_VERSION=$(grep '^Version' DESCRIPTION | sed 's/.*: *//')" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
ref: main

- name: Old version
run: |
echo "OLD_VERSION=$(grep '^Version' DESCRIPTION | sed 's/.*: *//')" >> $GITHUB_ENV
- name: Compare versions
run: |
Rscript -e "if (commandArgs(TRUE)[1] <= commandArgs(TRUE)[2]) stop('Package version has not been updated.')" ${{ env.NEW_VERSION }} ${{ env.OLD_VERSION }}
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mlr3extralearners
Title: Extra Learners For mlr3
Version: 0.3.1
Version: 0.3.2
Authors@R:
c(person(given = "Raphael",
family = "Sonabend",
Expand Down

0 comments on commit 0a3ac0b

Please sign in to comment.