Skip to content

support: Create github actions to automatically release RC at scheduled times #9

support: Create github actions to automatically release RC at scheduled times

support: Create github actions to automatically release RC at scheduled times #9

name: Create RC release Branche with the Scheduler (for dev/7.0.x)
# on:
# schedule:
# - cron: '0 0 * * *'
on:
pull_request:
branches:
- master
jobs:
create-rc-release-branch:
runs-on: ubuntu-latest
steps:
- name: Set current datetime as env variable
id: set-current-datetime
env:
TZ: 'Asia/Tokyo'
run: echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
- name: Checkout target branch
uses: actions/checkout@v3
with:
ref: dev/7.0.x
- name: Create RC release branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit --allow-empty -m "empty commit to run release-rc.yml"
git checkout -b rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}
git push --set-upstream origin rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}