Skip to content

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

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

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

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@v4
with:
ref: dev/7.0.x
- name: Create RC release branch
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout -b rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}
git commit --allow-empty -m "empty commit to run release-rc.yml"
git push --set-upstream origin rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}
gh pr create --title "Release ${{ steps.package-json.outputs.packageVersion }}-${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}" --body "test"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Retrieve information from package.json
# uses: myrotvorets/[email protected]
# id: package-json
# - name: Create PR
# uses: repo-sync/pull-request@v2
# with:
# source_branch: rc/${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}
# destination_branch: dev/7.0.x
# pr_title: Release ${{ steps.package-json.outputs.packageVersion }}-${{ steps.set-current-datetime.outputs.CURRENT_DATETIME }}
# github_token: ${{ secrets.GITHUB_TOKEN }}