Skip to content

Commit

Permalink
.github/workflows/windows-release.yml: support multiple model-tags
Browse files Browse the repository at this point in the history
Signed-off-by: akarin <[email protected]>
  • Loading branch information
AkarinVS committed Sep 23, 2022
1 parent be5fc73 commit bf84bcb
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
description: 'which tag to create and release?'
required: true
default: 'v100'
model-tag:
description: 'which tag of model release to use?'
model-tags:
description: 'which tag(s) of model release to use? (comma-separated list of tags)'
required: true
default: 'model-20211209'
ov_tag:
Expand Down Expand Up @@ -90,14 +90,18 @@ jobs:
mkdir -p release/models
cd release
pushd models
curl -s https://api.github.com/repos/AmusementClub/vs-mlrt/releases/tags/'${{ github.event.inputs.model-tag }}' > release.json
for url in $(cat release.json | jq '.assets | .[] | .url ' | tr -d '"'); do
echo "Downloading $url"
curl -o dl.7z -LJO -H 'Accept: application/octet-stream' "$url"
7za x dl.7z
for tag in $(echo "${{ github.event.inputs.model-tags }}" | tr ',' ' '); do
echo "Handling tag $tag"
curl -s https://api.github.com/repos/AmusementClub/vs-mlrt/releases/tags/"$tag" > release.json
for url in $(cat release.json | jq '.assets | .[] | .url ' | tr -d '"'); do
echo "Downloading $url"
curl -o dl.7z -LJO -H 'Accept: application/octet-stream' "$url"
# later release should overwrite earlier ones
7za x -y dl.7z
done
test -f "dl.7z"
rm -f dl.7z release.json
done
test -f "dl.7z"
rm -f dl.7z release.json
popd
ls -lR
du -sh
Expand Down

0 comments on commit bf84bcb

Please sign in to comment.