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
This commit is contained in:
@@ -91,17 +91,32 @@ jobs:
|
|||||||
PLATFORM="${{ matrix.goos }}-${{ matrix.goarch }}"
|
PLATFORM="${{ matrix.goos }}-${{ matrix.goarch }}"
|
||||||
ARCHIVE_NAME="onvif-go-${VERSION}-${PLATFORM}"
|
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
|
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||||
# Create ZIP for Windows
|
cp dist/onvif-cli-${{ matrix.goos }}-${{ matrix.goarch }}.exe staging/onvif-cli.exe
|
||||||
cd dist
|
cp dist/onvif-quick-${{ matrix.goos }}-${{ matrix.goarch }}.exe staging/onvif-quick.exe
|
||||||
zip -j "../releases/${ARCHIVE_NAME}.zip" *-${{ matrix.goos }}-${{ matrix.goarch }}.exe ../README.md ../LICENSE
|
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 ..
|
cd ..
|
||||||
else
|
else
|
||||||
# Create tar.gz for Unix-like systems
|
cd staging
|
||||||
cd dist
|
tar czf "../releases/${ARCHIVE_NAME}.tar.gz" .
|
||||||
tar czf "../releases/${ARCHIVE_NAME}.tar.gz" *-${{ matrix.goos }}-${{ matrix.goarch }} -C .. README.md LICENSE
|
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user