Skip to content

Create Release Pull Request #23

Create Release Pull Request

Create Release Pull Request #23

name: Create Release Pull Request
on: [workflow_dispatch]
jobs:
create_release_pull_request:
name: Create Release Pull Request
runs-on: 'ubuntu-latest'
steps:
- name: Checkout code
uses: actions/checkout@master
- uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
- name: Get version
id: get_version
run: |
echo ::set-output name=new_version::$(node -p "require('./package.json').version")
- name: Get Release Details
id: release_details
uses: botpress/gh-actions/get_release_details@v2
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.BOTPRESS_BOT_APP_ID }}
private_key: ${{ secrets.BOTPRESS_BOT_APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
id: pull_request
with:
token: ${{ steps.generate-token.outputs.token }}
title: 'chore(server): release v${{ steps.get_version.outputs.new_version }}'
commit-message: 'chore(server): release v${{ steps.get_version.outputs.new_version }}'
branch: 'release/v${{ steps.get_version.outputs.new_version }}'
body: ${{ steps.release_details.outputs.changelog }}