Release Pull Request Automation #28
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: Release Pull Request Automation | |
on: | |
create: | |
jobs: | |
release-pull-request-automation: | |
if: ${{ github.event.ref_type == 'branch' && contains( github.ref, 'release/' ) }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Generate title | |
run: | | |
BRANCH=${GITHUB_REF##*/} | |
echo $BRANCH | |
VERSION=${BRANCH#'release/'} | |
echo ::set-output name=result::"Release: ${VERSION}" | |
id: title | |
- name: Create Pull Request | |
run: gh pr create --title "${{ steps.title.outputs.result }}" --body-file ./.github/release-pull-request-template.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |