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: