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:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: linux
|
platform: linux
|
||||||
- os: macos-latest
|
|
||||||
platform: mac
|
|
||||||
- os: windows-latest
|
|
||||||
platform: win
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -118,6 +114,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '22'
|
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
|
- name: Build frontend
|
||||||
run: |
|
run: |
|
||||||
cd web
|
cd web
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ elif [ -x "$LOCAL_GO_DIR/bin/go" ] && "$LOCAL_GO_DIR/bin/go" version 2>/dev/null
|
|||||||
else
|
else
|
||||||
# Detect platform and architecture
|
# Detect platform and architecture
|
||||||
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||||
|
case "$OS" in
|
||||||
|
msys*|mingw*) OS="windows" ;;
|
||||||
|
esac
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
x86_64) ARCH="amd64" ;;
|
x86_64) ARCH="amd64" ;;
|
||||||
@@ -28,7 +31,13 @@ else
|
|||||||
|
|
||||||
echo "Downloading Go ${GO_VERSION} for ${OS}/${ARCH}..."
|
echo "Downloading Go ${GO_VERSION} for ${OS}/${ARCH}..."
|
||||||
rm -rf "$LOCAL_GO_DIR"
|
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 GOROOT="$LOCAL_GO_DIR"
|
||||||
export PATH="$LOCAL_GO_DIR/bin:$PATH"
|
export PATH="$LOCAL_GO_DIR/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user