Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ jobs:
if: ${{ steps.release.outputs.release_created }}
run: bun install

- name: Compile Binary (Linux)
- name: Compile Binaries (Linux x64 and ARM64)
if: ${{ steps.release.outputs.release_created }}
run: bun build ./src/index.ts --compile --target=bun-linux-x64 --outfile jellycc-linux-x64
run: |
bun build ./src/index.ts --compile --target=bun-linux-x64 --outfile jellycc-linux-x64
bun build ./src/index.ts --compile --target=bun-linux-arm64 --outfile jellycc-linux-arm64

- name: Upload Release Asset
- name: Upload Release Assets
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} jellycc-linux-x64
run: gh release upload ${{ steps.release.outputs.tag_name }} jellycc-linux-x64 jellycc-linux-arm64
17 changes: 15 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ set -e

echo "🚀 Starting JellyCC installation..."

# Detect OS architecture
ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then
ASSET_ARCH="x64"
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
ASSET_ARCH="arm64"
else
echo "✖ Error: Unsupported architecture ($ARCH). JellyCC currently supports x86_64 and aarch64."
exit 1
fi

echo "🖥️ Detected architecture: $ARCH -> using asset jellycc-linux-$ASSET_ARCH"

# 1. Fetch the latest release version
echo "🔍 Fetching the latest version..."
LATEST_VERSION=$(curl -s https://api.github.com/repos/parkejunior/jellycc-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
Expand All @@ -15,8 +28,8 @@ fi

echo "📦 Found version: $LATEST_VERSION"

# 2. Define the download URL for the binary
BINARY_URL="https://github.com/parkejunior/jellycc-cli/releases/download/${LATEST_VERSION}/jellycc-linux-x64"
# 2. Define the download URL for the binary dynamically based on architecture
BINARY_URL="https://github.com/parkejunior/jellycc-cli/releases/download/${LATEST_VERSION}/jellycc-linux-${ASSET_ARCH}"

# 3. Download the file to a temporary directory
TMP_FILE="/tmp/jellycc"
Expand Down
Loading