Create release PR #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: Create release PR | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The new version number. Example: 1.40.1' | |
required: true | |
jobs: | |
init_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # gives the changelog generator access to all previous commits | |
- name: Create release branch | |
run: scripts/create_release_branch.sh "${{ github.event.inputs.version }}" | |
- name: Get changelog diff | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const get_change_log_diff = require('./scripts/get_changelog_diff.js') | |
core.exportVariable('CHANGELOG', get_change_log_diff()) | |
- name: Open pull request | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh pr create \ | |
-t "chore: release ${{ github.event.inputs.version }}" \ | |
-b "# :rocket: ${{ github.event.inputs.version }} | |
Make sure to use squash & merge when merging! | |
Once this is merged, another job will kick off automatically and publish the package. | |
# :memo: Changelog | |
${{ env.CHANGELOG }}" |