Skip to content

Commit 8e5e83f

Browse files
committed
use platform specified changelog for mc-publish to protect github release
1 parent 1e1c602 commit 8e5e83f

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,26 @@ jobs:
135135
echo "hash=$FILE_HASH" >> $GITHUB_OUTPUT
136136
cat $GITHUB_OUTPUT
137137
138+
- name: Prepare changelog
139+
uses: actions/github-script@v6
140+
id: changelog
141+
with:
142+
script: return process.env.CHANGELOG
143+
result-encoding: string
144+
env:
145+
CHANGELOG: |-
146+
${{ format('{0}{1}', github.event.release.body, steps.get_release.outputs.body) }}
147+
148+
-------
149+
150+
Build Information
151+
152+
- File name: `${{ steps.file_info.outputs.name }}`
153+
- SHA-256: `${{ steps.file_info.outputs.hash }}`
154+
- Built from: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
155+
138156
- name: Publish Minecraft Mods
139-
uses: Fallen-Breath/[email protected].0-fallen.1
157+
uses: Kir-Antipov/[email protected]
140158
with:
141159
# modrinth-id: fo0Bar
142160
# modrinth-token: ${{ secrets.MODRINTH_API_TOKEN }}
@@ -146,24 +164,14 @@ jobs:
146164

147165
github-tag: ${{ steps.release_info.outputs.tag_name }}
148166
github-token: ${{ secrets.GITHUB_TOKEN }}
149-
github-update-release-body: false
150167

151168
files: ${{ steps.file_info.outputs.path }}
152169

153170
name: ${{ format('{0} v{1} for mc{2}', steps.properties_g.outputs.mod_name, steps.properties_g.outputs.mod_version, steps.properties_v.outputs.minecraft_version) }}
154171
version: ${{ format('mc{0}-v{1}', steps.properties_v.outputs.minecraft_version, steps.properties_g.outputs.mod_version) }}
155172
version-type: release
156-
changelog: |-
157-
${{ format('{0}{1}', github.event.release.body, steps.get_release.outputs.body) }}
158-
159-
-------
160-
161-
Build Information
162-
163-
- File name: `${{ steps.file_info.outputs.name }}`
164-
- SHA-256: `${{ steps.file_info.outputs.hash }}`
165-
- Built from: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
166-
173+
modrinth-changelog: ${{ steps.changelog.outputs.result }}
174+
curseforge-changelog: ${{ steps.changelog.outputs.result }}
167175
loaders: fabric
168176
game-versions: ${{ steps.game_versions.outputs.value }}
169177
game-version-filter: any

0 commit comments

Comments
 (0)