Skip to content

Commit

Permalink
[wip] version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
daniperez committed Aug 14, 2023
1 parent 041a56f commit ebe4c7f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/check-vale-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Schedule Commit

on:
# schedule:
# - cron: '0 0 * * *' # This schedule runs every day at midnight UTC
pull-request:

jobs:
commit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check Vale's last version
run: |
VALE_LAST_VERSION=$(gh release list -l 1 -R errata-ai/vale)
VALE_PYTHON_LAST_VERSION=$(cat pyproject.toml | grep "^version =" | cut -d "\"" -f 2 | sed "s/\.[^.]*$//" | cut -d "." -f -3)
echo "Current Vale version : $VALE_LAST_VERSION"
echo "Current Python Vale version : $VALE_PYTHON_LAST_VERSION"
if "$VALE_LAST_VERSION" != "$VALE_PYTHON_LAST_VERSION"; then
echo "Versions differ, updating."
echo "VALE_LAST_VERSION=$VALE_LAST_VERSION" >> $GITHUB_OUTPUT
else
echo "Same versions 🎉"
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
fi
# - name: Version bump
# if: ${{ success() }}
# run: |
# # Commit version bump (change pyproject.yaml, CHANGELOG and README.md):
# # VALE_LAST_VERSION=${{ steps.vars.outputs.VALE_LAST_VERSION }}

0 comments on commit ebe4c7f

Please sign in to comment.