name: Update Release Notes
on:
workflow_call:
inputs:
tag:
required: true
type: string
permissions:
contents: write
jobs:
update-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with:
ref: ${{ inputs.tag }}
fetch-depth: 0
persist-credentials: false
- name: Generate release notes
id: cliff
uses: orhun/git-cliff-action@c93ef52f3d0ddcdcc9bd5447d98d458a11cd4f72 with:
config: github-keepachangelog
args: --latest --strip all
env:
OUTPUT: ${{ runner.temp }}/release-notes.md
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
- name: Update release body
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ inputs.tag }}
run: |
gh release edit "$RELEASE_TAG" \
--notes-file "${{ runner.temp }}/release-notes.md" \
--repo "${{ github.repository }}"