Skip to content

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

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

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

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: Commit
uses: actions-x/commit@v6
with:
name: GitHub Actions Autocommitter
token: ${{ secrets.GITHUB_TOKEN }}
branch: rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}
message: 'empty commit to run Github actions'
- name: Create RC release branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout -b rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}
git push --set-upstream origin rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}