A GitHub action to create release notes for pull request.
Create a workflow .yml file in your repositories .github/workflows
directory. For more information, reference the GitHub Help Documentation.
This workflow will be running only if it's run for pull request. Otherwise it will fail with message: This is not a Pull Request
.
github_token
: Github tokenfeature_commit_pattern
: Feature commit pattern. Example:JIRA-
. You can use same pattern as for autolinking issues.description_template
: This is a description template use {{features}} to replace it by list of commits matched using feature_commit_pattern and {{chores}} will be replace by commit description list not matched feature_commit_pattern. Default value:# Features: {{features}} # Chores: {{chores}}
description_template_filepath
: If you need to use more complex template you can use MD file. Use {{feature_commits}} in the template to replace it with list of commits matched using feature_commit_pattern and {{chores_commits}} will be replace by commit description list not matched feature_commit_pattern. This will overwrite description_template. If file not exist will fallback to description_template. Sample template file can be found here.title_template
: This is a pattern for PR name. {{date}} will be replace by D MM. Default value:Deployment {{date}}
name: Test Action
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
test-correct:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Test action
uses: szymansd/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
description_template_filepath: './.github/templates/deployment.md'