Set up assets in build process
This commit is contained in:
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -104,10 +104,6 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: linux
|
||||
- os: macos-latest
|
||||
platform: mac
|
||||
- os: windows-latest
|
||||
platform: win
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -118,6 +114,21 @@ jobs:
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Build WASM binary
|
||||
run: |
|
||||
cd kobopatch-wasm
|
||||
./setup.sh
|
||||
./build.sh
|
||||
|
||||
- name: Set up NickelMenu assets
|
||||
run: nickelmenu/setup.sh
|
||||
|
||||
- name: Set up KOReader assets
|
||||
run: koreader/setup.sh
|
||||
|
||||
- name: Set up Readerly assets
|
||||
run: readerly/setup.sh
|
||||
|
||||
- name: Build frontend
|
||||
run: |
|
||||
cd web
|
||||
|
||||
@@ -16,6 +16,9 @@ elif [ -x "$LOCAL_GO_DIR/bin/go" ] && "$LOCAL_GO_DIR/bin/go" version 2>/dev/null
|
||||
else
|
||||
# Detect platform and architecture
|
||||
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||
case "$OS" in
|
||||
msys*|mingw*) OS="windows" ;;
|
||||
esac
|
||||
ARCH="$(uname -m)"
|
||||
case "$ARCH" in
|
||||
x86_64) ARCH="amd64" ;;
|
||||
@@ -28,7 +31,13 @@ else
|
||||
|
||||
echo "Downloading Go ${GO_VERSION} for ${OS}/${ARCH}..."
|
||||
rm -rf "$LOCAL_GO_DIR"
|
||||
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.${OS}-${ARCH}.tar.gz" | tar -xz -C "$SCRIPT_DIR"
|
||||
if [ "$OS" = "windows" ]; then
|
||||
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.${OS}-${ARCH}.zip" -o "$SCRIPT_DIR/go.zip"
|
||||
unzip -q "$SCRIPT_DIR/go.zip" -d "$SCRIPT_DIR"
|
||||
rm "$SCRIPT_DIR/go.zip"
|
||||
else
|
||||
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.${OS}-${ARCH}.tar.gz" | tar -xz -C "$SCRIPT_DIR"
|
||||
fi
|
||||
export GOROOT="$LOCAL_GO_DIR"
|
||||
export PATH="$LOCAL_GO_DIR/bin:$PATH"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user