Simplify release body construction by removing unnecessary conditional for commit hash inclusion

This commit is contained in:
XargonWan 2025-01-10 10:11:28 +09:00
parent 0752b396fc
commit acb3690e65

View file

@ -37,9 +37,7 @@ jobs:
release_name="$(echo $latest_release | jq -r .body | grep -oP 'Vita3K Build: \d+' | sed 's/Vita3K Build: /Vita3K - Build /')" release_name="$(echo $latest_release | jq -r .body | grep -oP 'Vita3K Build: \d+' | sed 's/Vita3K Build: /Vita3K - Build /')"
commit_hash="$(echo $latest_release | jq -r .body | grep -oP 'Corresponding commit: \K[0-9a-f]{40}')" commit_hash="$(echo $latest_release | jq -r .body | grep -oP 'Corresponding commit: \K[0-9a-f]{40}')"
if [ -n "$commit_hash" ]; then
release_body+="\n\nCorresponding commit: [$commit_hash](https://github.com/Vita3K/Vita3K/commit/$commit_hash)" release_body+="\n\nCorresponding commit: [$commit_hash](https://github.com/Vita3K/Vita3K/commit/$commit_hash)"
fi
echo "tag_name=$tag_name" >> $GITHUB_ENV echo "tag_name=$tag_name" >> $GITHUB_ENV
echo "release_body=$release_body" >> $GITHUB_ENV echo "release_body=$release_body" >> $GITHUB_ENV