File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -145,18 +145,19 @@ jobs:
145145
146146 - name : Prepare Final Changelog
147147 id : changelog
148- # Pass the multi-line content safely via an environment variable
148+ # Add this 'env' block to safely load the changelogs as environment variables
149149 env :
150- CHANGELOG_CONTENT : ${{ steps.git-cliff.outputs.content }}
150+ RELEASE_NOTES : ${{ inputs.release-changelog }}
151+ DEV_NOTES : ${{ steps.git-cliff.outputs.content }}
151152 run : |
152153 NOTES=""
153154 if [[ "${{ inputs.is-release-build }}" == "true" ]]; then
154- # Use the release changelog if this is a release build
155- NOTES="${{ inputs.release-changelog }}"
155+ # Use the environment variable for the release changelog.
156+ # The double quotes are critical to preserve newlines!
157+ NOTES="$RELEASE_NOTES"
156158 else
157- # Otherwise, use the content from the environment variable.
158- # It's crucial to quote it to preserve newlines.
159- NOTES="$CHANGELOG_CONTENT"
159+ # Use the environment variable for the dev changelog.
160+ NOTES="$DEV_NOTES"
160161 fi
161162
162163 if [ -z "$NOTES" ]; then
@@ -169,7 +170,6 @@ jobs:
169170 echo "$NOTES"
170171 echo "EOF"
171172 } >> "$GITHUB_OUTPUT"
172-
173173 # ------------------------------------------------------------------
174174 # Publish to Modrinth & API
175175 # ------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments