Skip to content

Commit

Permalink
.github/workflows/windows-release.yml: package contrib models
Browse files Browse the repository at this point in the history
also add support for a rolling nightly release.

Signed-off-by: akarin <[email protected]>
  • Loading branch information
AkarinVS committed Apr 20, 2023
1 parent 668058b commit b0118ae
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
tag:
description: 'which tag to create and release?'
required: true
default: 'v100'
default: 'nightly'
model-tags:
description: 'which tag(s) of model release to use? (comma-separated list of tags)'
required: true
Expand All @@ -15,6 +15,10 @@ on:
description: 'which tag(s) of external model release to use?'
required: true
default: 'external-models'
contrib-model-tags:
description: 'which tag(s) of contributed model release to use?'
required: true
default: 'contrib-models'
ov_tag:
description: 'which tag of openvino to use'
required: true
Expand Down Expand Up @@ -149,10 +153,42 @@ jobs:
path: release
retention-days: 1

- name: Download Contributed Models
run: |
rm -rf release
set -ex
mkdir -p release/models
cd release
pushd models
for tag in $(echo "${{ github.event.inputs.contrib-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 -LJ -H 'Accept: application/octet-stream' "$url"
# later release should overwrite earlier ones
7za x -y dl.7z
done
#test -f "dl.7z" # contrib-models might be empty.
rm -f dl.7z release.json
done
popd
ls -lR
du -sh
7za a -t7z -bb3 -mx=3 ../contrib-models.7z .
- name: Upload contrib model release
uses: actions/upload-artifact@v3
with:
name: Contrib-Models
path: release
retention-days: 1

- name: Rename release asset
run: |
mv models.7z models.${{ github.event.inputs.tag }}.7z
mv ext-models.7z ext-models.${{ github.event.inputs.tag }}.7z
mv contrib-models.7z contrib-models.${{ github.event.inputs.tag }}.7z
- name: Release models
uses: softprops/action-gh-release@v1
Expand All @@ -161,6 +197,7 @@ jobs:
files: |
models.${{ github.event.inputs.tag }}.7z
ext-models.${{ github.event.inputs.tag }}.7z
contrib-models.${{ github.event.inputs.tag }}.7z
fail_on_unmatched_files: true
generate_release_notes: false
prerelease: true
Expand Down Expand Up @@ -320,3 +357,9 @@ jobs:
fail_on_unmatched_files: true
generate_release_notes: false
prerelease: true

- name: Overwrite tag
run:
git pull --tags --force
git tag -f ${{ github.event.inputs.tag }}
git push -f origin ${{ github.event.inputs.tag }}

0 comments on commit b0118ae

Please sign in to comment.