|
11 | 11 | contents: write |
12 | 12 | steps: |
13 | 13 | - uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + fetch-depth: 0 |
| 16 | + fetch-tags: true |
14 | 17 | - name: Set up JDK 17 |
15 | 18 | uses: actions/setup-java@v4 |
16 | 19 | with: |
@@ -115,11 +118,22 @@ jobs: |
115 | 118 | gpg --batch --yes --passphrase "${{ env.SIGNING_PASSPHRASE }}" --armor --detach-sign ${{ steps.artifacts.outputs.forge }} |
116 | 119 | gpg --batch --yes --passphrase "${{ env.SIGNING_PASSPHRASE }}" --armor --detach-sign ${{ steps.artifacts.outputs.fabric }} |
117 | 120 | gpg --batch --yes --passphrase "${{ env.SIGNING_PASSPHRASE }}" --armor --detach-sign ${{ steps.artifacts.outputs.neoforge }} |
| 121 | + - name: Create Changelog Files |
| 122 | + run: | |
| 123 | + echo "### Technical Changelog:" >> RELEASE_BODY.md |
| 124 | + latest_tag=$(git describe --tags --abbrev=0) |
| 125 | + previous_tag=$(git describe --tags --abbrev=0 --exclude=$latest_tag) |
| 126 | + git log "$previous_tag..$latest_tag^" --oneline --pretty="- %s (%H)" >> RELEASE_BODY.md |
| 127 | + echo "### Download:" >> RELEASE_BODY.md |
| 128 | + echo "- Official Website: https://mrcrayfish.com/mods/${{ steps.mod_id.outputs.value }}" >> RELEASE_BODY.md |
| 129 | + echo "- CurseForge: https://curseforge.com/minecraft/mc-mods/controllable" >> RELEASE_BODY.md |
| 130 | + git log "$previous_tag..$latest_tag^" --oneline --pretty="%s" > CHANGELOG.txt |
118 | 131 | - name: Create Release |
119 | 132 | uses: ncipollo/release-action@v1 |
120 | 133 | with: |
121 | 134 | name: '${{ steps.mc_version.outputs.value }}-${{ steps.mod_version.outputs.value }}' |
122 | | - artifacts: "${{ steps.artifacts.outputs.forge }},${{ steps.artifacts.outputs.forge }}.asc,${{ steps.artifacts.outputs.fabric }},${{ steps.artifacts.outputs.fabric }}.asc,${{ steps.artifacts.outputs.neoforge }},${{ steps.artifacts.outputs.neoforge }}.asc" |
| 135 | + artifacts: "${{ steps.artifacts.outputs.forge }},${{ steps.artifacts.outputs.forge }}.asc,${{ steps.artifacts.outputs.fabric }},${{ steps.artifacts.outputs.fabric }}.asc,${{ steps.artifacts.outputs.neoforge }},${{ steps.artifacts.outputs.neoforge }}.asc,CHANGELOG.txt" |
| 136 | + bodyFile: "RELEASE_BODY.md" |
123 | 137 | - name: Upload Forge Artifacts |
124 | 138 | uses: actions/upload-artifact@v4 |
125 | 139 | with: |
|
0 commit comments