Skip to content

Commit

Permalink
Merge pull request #35 from casswedson/auto-release-notes
Browse files Browse the repository at this point in the history
feat: auto generate release notes
  • Loading branch information
casswedson authored May 14, 2022
2 parents 7c0b8b2 + 5ab0117 commit d18a84e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
- 'README*'
- 'src/**'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
release:
name: Create Release
Expand Down Expand Up @@ -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/casswedson/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
Expand All @@ -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:
Expand Down

0 comments on commit d18a84e

Please sign in to comment.