-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupload-to-github.sh
More file actions
executable file
·40 lines (30 loc) · 1.16 KB
/
upload-to-github.sh
File metadata and controls
executable file
·40 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Script to upload processed binaries to GitHub Releases
# You'll need GitHub CLI (gh) installed: https://cli.github.com/manual/installation
# Configuration
RELEASE_TAG="v1.0.0"
RELEASE_NAME="FFmpeg Binaries v1.0.0"
RELEASE_NOTES="Pre-compiled FFmpeg binaries for multiple platforms"
PROCESSED_DIR="./binaries"
# Create a new release
echo "Creating GitHub release ${RELEASE_TAG}..."
gh release create $RELEASE_TAG \
--title "$RELEASE_NAME" \
--notes "$RELEASE_NOTES"
# Upload each platform's binaries
for platform_dir in "$PROCESSED_DIR"/*/; do
platform=$(basename "$platform_dir")
echo "Uploading binaries for ${platform}..."
# Upload each binary in the platform directory
for binary in "$platform_dir"/*; do
binary_name=$(basename "$binary")
new_name="${platform}-${binary_name}" # Rename binary to include platform
# Copy to a temporary location with the new name
temp_binary="/tmp/${new_name}"
cp "$binary" "$temp_binary"
# Upload with new name
gh release upload $RELEASE_TAG "$temp_binary" --clobber
echo "Uploaded ${new_name}"
done
done
echo "All binaries uploaded to GitHub release ${RELEASE_TAG}"