Skip to content

Scheduled Release

Scheduled Release #25

name: Scheduled Release
on:
schedule:
- cron: '0 15 * * 4'
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Config git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Merge develop -> master
run: |
git fetch
git checkout master
git pull
CHANGES=$(git log master..origin/develop --oneline)
if [[ -z "$CHANGES" ]]; then
echo "No changes to merge."
echo "has_changes=no" >> $GITHUB_ENV
else
git merge origin/develop
echo "has_changes=yes" >> $GITHUB_ENV
fi
- name: Push version changes to master
if: env.has_changes == 'yes'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master