Skip to content

Commit d75bab6

Browse files
committed
chore: zip WinUI artifacts before release upload
1 parent 48a9e39 commit d75bab6

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ jobs:
6363
name: winui-msix
6464
path: artifacts
6565

66+
- name: Archive artifacts
67+
run: |
68+
TAG="v${{ steps.version.outputs.version }}"
69+
ZIP="Classify.WinUI.${{ steps.version.outputs.version }}.zip"
70+
cd artifacts
71+
zip -r "../$ZIP" .
72+
mv "../$ZIP" .
73+
6674
- name: Create or update release
6775
env:
6876
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -82,9 +90,9 @@ jobs:
8290
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8391
run: |
8492
TAG="v${{ steps.version.outputs.version }}"
85-
mapfile -t files < <(find artifacts -type f)
86-
if [ ${#files[@]} -eq 0 ]; then
87-
echo "No artifacts found to upload."
93+
FILE="artifacts/Classify.WinUI.${{ steps.version.outputs.version }}.zip"
94+
if [ ! -f "$FILE" ]; then
95+
echo "Archive $FILE not found."
8896
exit 1
8997
fi
90-
gh release upload "$TAG" "${files[@]}" --repo "$GITHUB_REPOSITORY" --clobber
98+
gh release upload "$TAG" "$FILE" --repo "$GITHUB_REPOSITORY" --clobber

0 commit comments

Comments
 (0)