Skip to content

Commit ab15f58

Browse files
authored
Fix auto release (#64)
* Update cmake-multi-platform.yml * Update cmake-multi-platform.yml * fix file path name * fix script * test release * test this * Update cmake-multi-platform.yml * Update cmake-multi-platform.yml * Update cmake-multi-platform.yml * Only create a release on commit to main
1 parent 44d666a commit ab15f58

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/cmake-multi-platform.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,27 @@ jobs:
103103
cp $VULKAN_SDK/lib/libvulkan.* ${{ steps.strings.outputs.build-output-dir }}/bin/
104104
fi
105105
106+
- name: Zip Artifacts
107+
shell: pwsh
108+
run: |
109+
$buildDir = "${{ steps.strings.outputs.build-output-dir }}/bin"
110+
$zipName = "${{ matrix.os }}-${{ matrix.c_compiler }}-release.zip"
111+
112+
cd $buildDir
113+
if ($IsWindows) {
114+
# Use 7-zip on Windows
115+
7z a -tzip $zipName ./*
116+
} else {
117+
# Use native zip on Linux/macOS
118+
zip -r $zipName ./*
119+
}
120+
106121
- name: Upload Artifacts
107122
uses: actions/upload-artifact@v4
108123
with:
109124
name: ${{ matrix.os }}-${{ matrix.c_compiler }}-binaries
110125
path: |
111-
${{ steps.strings.outputs.build-output-dir }}/bin
126+
${{ steps.strings.outputs.build-output-dir }}/bin/*.zip
112127
retention-days: 5
113128

114129
release:

0 commit comments

Comments
 (0)