mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 11:59:48 +00:00
Fixing multiline expansion for the changelog
This commit is contained in:
parent
f484d02de4
commit
94c3bbd548
12
.github/workflows/build-and-release.yml
vendored
12
.github/workflows/build-and-release.yml
vendored
@ -800,8 +800,12 @@ jobs:
|
|||||||
changelog="${{ env.CHANGELOG }}"
|
changelog="${{ env.CHANGELOG }}"
|
||||||
links="${{ steps.virus_total.outputs.analysis }}"
|
links="${{ steps.virus_total.outputs.analysis }}"
|
||||||
|
|
||||||
|
# Create a temporary file for the changelog:
|
||||||
|
temp_changelog=$(mktemp)
|
||||||
|
|
||||||
# Add the new Markdown section:
|
# Add the new Markdown section:
|
||||||
changelog="$changelog\n\n## Virus scans"
|
echo -e "$changelog" > $temp_changelog
|
||||||
|
echo -e "\n\n## Virus scans" >> $temp_changelog
|
||||||
|
|
||||||
# Split the analysis output by comma:
|
# Split the analysis output by comma:
|
||||||
IFS=',' read -ra analysis_array <<< "$links"
|
IFS=',' read -ra analysis_array <<< "$links"
|
||||||
@ -809,13 +813,13 @@ jobs:
|
|||||||
# Append each file and link to the changelog:
|
# Append each file and link to the changelog:
|
||||||
for item in "${analysis_array[@]}"; do
|
for item in "${analysis_array[@]}"; do
|
||||||
filename=$(echo $item | cut -d'=' -f1 | xargs)
|
filename=$(echo $item | cut -d'=' -f1 | xargs)
|
||||||
link=$(echo $item | cut -d'=' -f2 | xargs)
|
link=$(echo $item | cut -d'=' -f2)
|
||||||
changelog="$changelog\n- [$(basename "$filename")]($link)"
|
echo "- [$(basename "$filename")]($link)" >> $temp_changelog
|
||||||
done
|
done
|
||||||
|
|
||||||
# Export the modified changelog (using HEREDOC syntax for multi-line support):
|
# Export the modified changelog (using HEREDOC syntax for multi-line support):
|
||||||
echo "CHANGELOG<<EOOOF" >> $GITHUB_ENV
|
echo "CHANGELOG<<EOOOF" >> $GITHUB_ENV
|
||||||
echo "$changelog" >> $GITHUB_ENV
|
cat $temp_changelog >> $GITHUB_ENV
|
||||||
echo "EOOOF" >> $GITHUB_ENV
|
echo "EOOOF" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
|
Loading…
Reference in New Issue
Block a user