First create a secret in your repository called OPENAI_KEY
with your OpenAI API key.
https://platform.openai.com/account/api-keys
Then create a workflow file (e.g. .github/workflows/release_notes.yml
) with the following content:
name: Generate Enhanced Release Notes
run-name: Action started by ${{ github.actor }}
on:
workflow_dispatch:
inputs:
tagName:
description: 'Tag of the release.'
required: true
type: string
jobs:
print_enhanced_release_notes:
runs-on: ubuntu-latest
steps:
- name: Generate Release Notes
id: release_notes
uses: emanuel-braz/github-actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.event.inputs.tagName }}
openai_key: ${{ secrets.OPENAI_KEY }}
use_previous_tag_latest_release: true
verbose: true
- name: Print Release Notes (Use it as you want)
run: |
echo "${{ steps.release_notes.outputs.release_notes }}"
echo "---"
echo "${{ steps.release_notes.outputs.enhanced_notes }}"
Required The name of the tag.
Required The token to use to create the release. Use "${{ secrets.GITHUB_TOKEN }}"
.
Required The key to use to generate the release notes. Use "${{ secrets.OPENAI_KEY }}"
.
Optional The name of the previous tag. if "usePreviousTagLatestRelease" is true, this is ignored.
Optional Whether to use the latest release of the previous tag to generate the release notes. Default false
.
Optional Whether to print verbose output. Default false
.
The original release notes.
The enhanced release notes.
- Add support for multiple languages
- Add support for multiple models