mirror of
https://github.com/RetroDECK/Vita3K-bin.git
synced 2025-01-19 12:45:38 +00:00
Fetch release assets directly in the workflow and streamline asset download process
This commit is contained in:
parent
03178f4e3a
commit
7947f874c1
15
.github/workflows/fetch-release.yml
vendored
15
.github/workflows/fetch-release.yml
vendored
|
@ -27,7 +27,13 @@ jobs:
|
||||||
latest_release=$(curl -s https://api.github.com/repos/Vita3K/Vita3K/releases/latest)
|
latest_release=$(curl -s https://api.github.com/repos/Vita3K/Vita3K/releases/latest)
|
||||||
echo "tag_name=$(echo $latest_release | jq -r .tag_name)"
|
echo "tag_name=$(echo $latest_release | jq -r .tag_name)"
|
||||||
echo "release_body=$(echo $latest_release | jq -r .body)"
|
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+')
|
release_name=$(echo $latest_release | jq -r .body | grep -oP 'Vita3K Build: \d+')
|
||||||
echo "release_name=$release_name"
|
echo "release_name=$release_name"
|
||||||
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}')
|
||||||
|
@ -40,13 +46,6 @@ jobs:
|
||||||
echo "assets=$assets" >> $GITHUB_ENV
|
echo "assets=$assets" >> $GITHUB_ENV
|
||||||
echo "release_name=$release_name" >> $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
|
- name: Create release in this repository
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
|
|
Loading…
Reference in a new issue