support: Create github actions to automatically release RC at scheduled times #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 | |
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 }} |