From fddb6fcbe0eeb562312bb4a881db1bf880fe9bad Mon Sep 17 00:00:00 2001 From: casswedson <58050969+casswedson@users.noreply.github.com> Date: Sat, 14 May 2022 13:23:58 -0500 Subject: [PATCH] feat: auto generate release notes --- .github/workflows/release.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ef88bdb5b540..16a35abd24c5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,9 @@ on: - 'README*' - 'src/**' +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: release: name: Create Release @@ -54,6 +57,15 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} custom_tag: ${{ steps.generate_env_vars.outputs.tag_name }} tag_prefix: "" + - name: "Generate release notes" + run: | + gh api \ + --method POST \ + -H "Accept: application/vnd.github.v3+json" \ + /repos/CleverRaven/Cataclysm-DDA/releases/generate-notes \ + -f tag_name='${{ steps.generate_env_vars.outputs.tag_name }}' \ + -f target_commitish='master' \ + -q .body > CHANGELOG.md - name: Create release id: create_release uses: actions/create-release@v1 @@ -63,8 +75,7 @@ jobs: with: tag_name: ${{ steps.generate_env_vars.outputs.tag_name }} release_name: ${{ steps.generate_env_vars.outputs.release_name }} - body: | - These are the outputs for the experimental build of commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) + body_path: ./CHANGELOG.md draft: false prerelease: true builds: