[Release] Step 1: Generate release notes #10
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: "[Release] Step 1: Generate release notes" | |
on: | |
workflow_dispatch: | |
# limit the permissions of the GITHIUB_TOKEN to reading repository contents | |
# the subsequent pull request uses a token from the 'generate-token' step | |
permissions: | |
contents: read | |
jobs: | |
generateReleaseNotes: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Get all git tags | |
run: | | |
git fetch --prune --unshallow --tags | |
git tag | |
- name: Download flankScripts and add it to PATH | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
./gradlew :flank-scripts:download | |
echo "./flank-scripts/bash" >> $GITHUB_PATH | |
- name: Set next release tag variable | |
run: | | |
TAG=$(flankScripts release next_tag --token=${{ secrets.GITHUB_TOKEN }}) | |
echo "NEXT_RELEASE_TAG=$(echo $TAG)" >> $GITHUB_ENV | |
- name: Append release note | |
run: | | |
flankScripts release generate_release_notes --token=${{ secrets.GITHUB_TOKEN }} | |
- uses: tibdex/github-app-token@v2 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.FLANK_RELEASE_APP_ID }} | |
private_key: ${{ secrets.FLANK_RELEASE_PRIVATE_KEY }} | |
- name: Commit files and create Pull request | |
id: pr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
commit-message: "[Automatic PR] Generate release notes" | |
signoff: false | |
branch: 'release/${{ env.NEXT_RELEASE_TAG }}' | |
title: 'chore: release notes for ${{ env.NEXT_RELEASE_TAG }}' | |
body: "Auto generated release notes for `${{ env.NEXT_RELEASE_TAG }}` by @${{ github.actor }}" | |
labels: | | |
automated pr | |
release | |
reviewers: adamvduke,jakeouellette,tonybaroneee | |
owners | |
draft: false |