Fetch release assets directly in the workflow and streamline asset download process

This commit is contained in:
XargonWan 2025-01-10 09:59:56 +09:00
parent 03178f4e3a
commit 7947f874c1

View file

@ -27,7 +27,13 @@ jobs:
latest_release=$(curl -s https://api.github.com/repos/Vita3K/Vita3K/releases/latest)
echo "tag_name=$(echo $latest_release | jq -r .tag_name)"
echo "release_body=$(echo $latest_release | jq -r .body)"
echo "assets=$(echo $latest_release | jq -r '.assets[] | .browser_download_url')"
# fetching assets
mkdir -p artifacts
for url in "$(echo $latest_release | jq -r '.assets[] | .browser_download_url')"; do
wget -P artifacts $url
done
release_name=$(echo $latest_release | jq -r .body | grep -oP 'Vita3K Build: \d+')
echo "release_name=$release_name"
commit_hash=$(echo $latest_release | jq -r .body | grep -oP 'corresponding commit \K[0-9a-f]{40}')
@ -40,13 +46,6 @@ jobs:
echo "assets=$assets" >> $GITHUB_ENV
echo "release_name=$release_name" >> $GITHUB_ENV
- name: Download assets
run: |
mkdir -p artifacts
for url in ${{ env.assets }}; do
wget -P artifacts $url
done
- name: Create release in this repository
id: create_release
uses: actions/create-release@v1