Create Release Branch #9
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 Release Branch | |
on: | |
schedule: | |
- cron: '0 10 * * 2' | |
workflow_dispatch: | |
jobs: | |
create_release_branch: | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
- name: Create release branch | |
run: git checkout -b releases/${{ steps.date.outputs.date }} | |
- name: Push new branch | |
run: git push origin releases/${{ steps.date.outputs.date }} | |
- name: Create pull request into release | |
uses: thomaseizinger/create-pull-request@e3972219c86a56550fb70708d96800d8e24ba862 # 1.3.0 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
head: releases/${{ steps.date.outputs.date }} | |
base: release | |
title: Release ${{ steps.date.outputs.date }} |