From 239d68b4102e89f558a02ab588487ca59dec8f95 Mon Sep 17 00:00:00 2001 From: ProtoTess <32490978+0x524A@users.noreply.github.com> Date: Mon, 17 Nov 2025 15:44:19 +0000 Subject: [PATCH] fix: remove platform suffix from binaries inside release archives - Binaries inside archives now have clean names (onvif-cli, onvif-server, etc.) - Archive names still include platform info (onvif-go-v1.0.4-linux-amd64.tar.gz) - Users can extract and use binaries without renaming --- .github/workflows/release.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 804012d..a4095d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,17 +91,32 @@ jobs: PLATFORM="${{ matrix.goos }}-${{ matrix.goarch }}" ARCHIVE_NAME="onvif-go-${VERSION}-${PLATFORM}" - mkdir -p releases + mkdir -p releases staging + # Copy binaries with clean names (without platform suffix) if [ "${{ matrix.goos }}" = "windows" ]; then - # Create ZIP for Windows - cd dist - zip -j "../releases/${ARCHIVE_NAME}.zip" *-${{ matrix.goos }}-${{ matrix.goarch }}.exe ../README.md ../LICENSE + cp dist/onvif-cli-${{ matrix.goos }}-${{ matrix.goarch }}.exe staging/onvif-cli.exe + cp dist/onvif-quick-${{ matrix.goos }}-${{ matrix.goarch }}.exe staging/onvif-quick.exe + cp dist/onvif-server-${{ matrix.goos }}-${{ matrix.goarch }}.exe staging/onvif-server.exe + cp dist/onvif-diagnostics-${{ matrix.goos }}-${{ matrix.goarch }}.exe staging/onvif-diagnostics.exe + else + cp dist/onvif-cli-${{ matrix.goos }}-${{ matrix.goarch }} staging/onvif-cli + cp dist/onvif-quick-${{ matrix.goos }}-${{ matrix.goarch }} staging/onvif-quick + cp dist/onvif-server-${{ matrix.goos }}-${{ matrix.goarch }} staging/onvif-server + cp dist/onvif-diagnostics-${{ matrix.goos }}-${{ matrix.goarch }} staging/onvif-diagnostics + fi + + # Copy documentation + cp README.md LICENSE staging/ + + # Create archive from staging directory + if [ "${{ matrix.goos }}" = "windows" ]; then + cd staging + zip -r "../releases/${ARCHIVE_NAME}.zip" . cd .. else - # Create tar.gz for Unix-like systems - cd dist - tar czf "../releases/${ARCHIVE_NAME}.tar.gz" *-${{ matrix.goos }}-${{ matrix.goarch }} -C .. README.md LICENSE + cd staging + tar czf "../releases/${ARCHIVE_NAME}.tar.gz" . cd .. fi