generate release notes changelog text

develop
Myk Taylor 2023-07-31 04:43:43 -07:00
parent cf0b87fbc4
commit 97ea3f3d67
No known key found for this signature in database
2 changed files with 14 additions and 4 deletions

@ -20,7 +20,7 @@ Announcements
### Annc 1 ### Annc 1
Text
### PSAs ### PSAs
@ -60,6 +60,6 @@ Generated release notes
<details> <details>
<summary>New tools, fixes, and improvements</summary> <summary>New tools, fixes, and improvements</summary>
RELEASE NOTES HERE %RELEASE_NOTES%
</details> </details>

@ -48,6 +48,16 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: ${{ github.event.inputs.tag }} ref: ${{ github.event.inputs.tag }}
submodules: true
- name: Generate release text
run: |
python docs/gen_changelog.py -a
TOKEN_LINE=$(grep -Fhne '%RELEASE_NOTES%' .github/release_template.md | sed 's/:.*//')
head -n $((TOKEN_LINE - 1)) .github/release_template.md > release_body.md
CHANGELOG_LINES=$(wc -l <docs/changelogs/${{ github.event.inputs.tag }}-github.txt)
tail -n $((CHANGELOG_LINES - 3)) docs/changelogs/${{ github.event.inputs.tag }}-github.txt >> release_body.md
tail -n 2 .github/release_template.md >> release_body.md
cat release_body.md
- name: Stage win64 release - name: Stage win64 release
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
@ -70,7 +80,7 @@ jobs:
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
with: with:
artifacts: "dfhack-*" artifacts: "dfhack-*"
bodyFile: ".github/release_template.md" bodyFile: "release_body.md"
allowUpdates: true allowUpdates: true
artifactErrorsFailBuild: true artifactErrorsFailBuild: true
draft: true draft: true