Skip to content

Commit 9622a4b

Browse files
committed
🚧 Build changelog to include in release
1 parent 2da834d commit 9622a4b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,22 @@ jobs:
107107
run: |
108108
gpg --batch --yes --passphrase "${{ env.SIGNING_PASSPHRASE }}" --armor --detach-sign ${{ steps.artifacts.outputs.neoforge }}
109109
gpg --batch --yes --passphrase "${{ env.SIGNING_PASSPHRASE }}" --armor --detach-sign ${{ steps.artifacts.outputs.fabric }}
110+
- name: Create Changelog Files
111+
run: |
112+
echo "### Technical Changelog:" >> RELEASE_BODY.md
113+
latest_tag=$(git describe --tags --abbrev=0)
114+
previous_tag=$(git describe --tags --abbrev=0 --exclude=$latest_tag)
115+
git log "$previous_tag..$latest_tag^" --oneline --pretty="- %s (%H)" >> RELEASE_BODY.md
116+
echo "### Download:" >> RELEASE_BODY.md
117+
echo "- Official Website: https://mrcrayfish.com/mods/${{ steps.mod_id.outputs.value }}" >> RELEASE_BODY.md
118+
echo "- CurseForge: https://curseforge.com/minecraft/mc-mods/controllable" >> RELEASE_BODY.md
119+
git log "$previous_tag..$latest_tag^" --oneline --pretty="%s" > CHANGELOG.txt
110120
- name: Create Release
111121
uses: ncipollo/release-action@v1
112122
with:
113123
name: '${{ steps.mc_version.outputs.value }}-${{ steps.mod_version.outputs.value }}'
114-
artifacts: "${{ steps.artifacts.outputs.neoforge }},${{ steps.artifacts.outputs.neoforge }}.asc,${{ steps.artifacts.outputs.fabric }},${{ steps.artifacts.outputs.fabric }}.asc"
124+
artifacts: "${{ steps.artifacts.outputs.neoforge }},${{ steps.artifacts.outputs.neoforge }}.asc,${{ steps.artifacts.outputs.fabric }},${{ steps.artifacts.outputs.fabric }}.asc,CHANGELOG.txt"
125+
bodyFile: "RELEASE_BODY.md"
115126
- name: Upload NeoForge Artifacts
116127
uses: actions/upload-artifact@v4
117128
with:

0 commit comments

Comments
 (0)