Add version bump workflow

This commit is contained in:
Miodrag Milanovic 2021-07-26 11:25:32 +02:00
parent 987fca5297
commit 45968ad740
1 changed files with 31 additions and 0 deletions

31
.github/workflows/version.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Bump version
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Take last commit
id: log
run: echo "::set-output name=message::$(git log --no-merges -1 --oneline)"
- name: Bump version
if: "!contains(steps.log.outputs.message, 'Bump version')"
run: |
make bumpversion
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add Makefile
git commit -m "Bump version"
- name: Push changes # push the output folder to your repo
if: "!contains(steps.log.outputs.message, 'Bump version')"
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}