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
3 changes: 3 additions & 0 deletions .github/workflows/bump-homebrew-tap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
permissions:
contents: read

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
bump:
name: Bump Formula/risuko-cli.rb and Casks/risuko-app.rb
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
schedule:
- cron: '23 8 * * 5'

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
analyze:
name: Analyze
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ permissions:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
build-cli:
Expand Down
111 changes: 110 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,114 @@ on:
permissions:
contents: write

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
android-release:
name: Release (android)
runs-on: ubuntu-22.04
steps:
- name: Check out Git repository
uses: actions/checkout@v4
Comment thread
YueMiyuki marked this conversation as resolved.
Comment thread
YueMiyuki marked this conversation as resolved.
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Install Android SDK packages
shell: bash
run: |
set -euo pipefail
sdkmanager \
"platforms;android-36" \
"build-tools;35.0.0" \
"ndk;27.2.12479018"

- name: Setup Rust Android targets
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build Android release APKs
run: pnpm android:build
env:
ANDROID_NDK_VERSION: 27.2.12479018
ANDROID_API_LEVEL: 24

- name: Sign Android release APKs
run: pnpm android:sign
env:
ANDROID_SIGNING_KEYSTORE_BASE64: ${{ secrets.ANDROID_SIGNING_KEYSTORE_BASE64 }}
ANDROID_SIGNING_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEYSTORE_PASSWORD }}
ANDROID_SIGNING_KEY_ALIAS: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }}
ANDROID_SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}

- name: Package Android APKs with standardized names
shell: bash
run: |
set -euo pipefail
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
version="${{ github.ref_name }}"; version="${version#v}"
else
version=$(grep -m1 '^version' src-tauri/Cargo.toml | sed 's/.*"\(.*\)"/\1/')
fi
mkdir -p dist/android
declare -A labels=(
[arm]=arm
[arm64]=arm64
[x86]=x86
[x86_64]=x64
)
for abi in arm arm64 x86 x86_64; do
src="src-tauri/gen/android/app/build/outputs/apk/${abi}/release/app-${abi}-release.apk"
if [[ ! -f "$src" ]]; then
echo "::error::Signed Android APK not found: $src"
find src-tauri/gen/android/app/build/outputs/apk -type f -name '*.apk' -print || true
exit 1
fi
dest="dist/android/Risuko_${version}_android_${labels[$abi]}.apk"
cp "$src" "$dest"
echo "packaged: $dest"
done

- name: Upload Android APKs to GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: dist/android/*.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Android APK artifacts (manual builds)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: app-android
path: dist/android/*.apk

release:
name: Release (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -45,6 +152,8 @@ jobs:
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand Down Expand Up @@ -77,7 +186,7 @@ jobs:
xdg-utils

- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Inject updater public key from secrets
if: startsWith(github.ref, 'refs/tags/')
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ release

# tauri
src-tauri/target
src-tauri/gen
src-tauri/gen/*
!src-tauri/gen/android/
!src-tauri/gen/android/**

*.node
14 changes: 14 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ pnpm run dev
pnpm run build
```

### Android

需要 Android SDK 36、build-tools 35.0.0、NDK 27.2.12479018,以及 Rust 的 Android 目标

```bash
# Debug 包,单 ABI(快一些)
pnpm android:build:debug

# Release 拆 ABI 打包,并签名
pnpm android:build:signed
```

签名相关的环境变量在 `scripts/sign-android-apks.mjs`:`ANDROID_SIGNING_KEYSTORE_PATH`(CI 用 `ANDROID_SIGNING_KEYSTORE_BASE64`)、`ANDROID_SIGNING_KEYSTORE_PASSWORD`、`ANDROID_SIGNING_KEY_ALIAS`,可选 `ANDROID_SIGNING_KEY_PASSWORD`

## 🛠 技术栈

- [Tauri v2](https://v2.tauri.app/)
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,28 @@ pnpm run dev
pnpm run build
```

### Android

Requires Android SDK 36, build-tools 35.0.0, NDK 27.2.12479018, and Rust Android targets.

```bash
# Debug build, single ABI (faster)
pnpm android:build:debug

# Release APKs (split per ABI), then sign
pnpm android:build:signed
```

A few files under `src-tauri/gen/android/` are autogenerated by Tauri and gitignored on purpose:

- `tauri.settings.gradle` — has hardcoded paths into your local Cargo registry, would break on other machines
- `app/tauri.build.gradle.kts` — plugin dependency list
- `app/tauri.properties` — version numbers pulled from `tauri.conf.json`

`pnpm android:build` regenerates all three every time. If they go missing or look stale, just run a build. Don't commit them.

Signing reads `ANDROID_SIGNING_KEYSTORE_PATH` (or `ANDROID_SIGNING_KEYSTORE_BASE64` in CI), `ANDROID_SIGNING_KEYSTORE_PASSWORD`, `ANDROID_SIGNING_KEY_ALIAS`, and optionally `ANDROID_SIGNING_KEY_PASSWORD`. See `scripts/sign-android-apks.mjs`

## 🛠 Technology Stack

- [Tauri v2](https://v2.tauri.app/)
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"includes": [
Expand Down
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "risuko",
"version": "0.3.3",
"version": "0.3.4",
"description": "A full-featured download manager",
"homepage": "https://risuko.vercel.app",
"author": {
Expand All @@ -19,6 +19,11 @@
"build": "node scripts/build.mjs",
"dev:renderer": "vite --config vite.renderer.config.ts --mode development --port 9080",
"pack:renderer": "vite build --config vite.renderer.config.ts --mode production",
"android:dev": "node scripts/android-env.mjs pnpm exec tauri android dev",
"android:build": "node scripts/android-env.mjs pnpm exec tauri android build --apk --split-per-abi",
"android:build:debug": "node scripts/android-env.mjs pnpm exec tauri android build --debug --target aarch64 --apk --split-per-abi",
"android:build:signed": "pnpm android:build && pnpm android:sign",
"android:sign": "node scripts/sign-android-apks.mjs",
"fmt": "pnpx @biomejs/biome check --write --max-diagnostics none",
"typecheck": "vue-tsc --noEmit -p tsconfig.json",
"knip": "pnpx knip --fix",
Expand All @@ -30,14 +35,14 @@
"node": ">=22.0.0"
},
"dependencies": {
"@lucide/vue": "^1.16.0",
"@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
"@tauri-apps/plugin-dialog": "^2.7.1",
"@vueuse/core": "^14.3.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"eventemitter3": "^5.0.4",
"@lucide/vue": "^1.16.0",
"motion-v": "^2.2.1",
"reka-ui": "^2.9.8",
"tailwind-merge": "^3.6.0",
Expand All @@ -53,11 +58,11 @@
"@tauri-apps/cli": "^2.11.2",
"@types/node": "^25.9.1",
"@vitejs/plugin-vue": "^6.0.7",
"@vue/compiler-sfc": "^3.5.34",
"@vue/compiler-sfc": "^3.5.35",
"axios": "^1.16.1",
"cfonts": "^3.3.1",
"chalk": "^5.6.2",
"i18next": "^26.2.0",
"i18next": "^26.3.0",
"lodash": "^4.18.1",
"normalize.css": "^8.0.1",
"pinia": "^3.0.4",
Expand All @@ -68,9 +73,9 @@
"typescript": "^6.0.3",
"vite": "^8.0.14",
"vite-plugin-static-copy": "^4.1.0",
"vue": "^3.5.34",
"vue": "^3.5.35",
"vue-router": "^5.0.7",
"vue-tsc": "^3.3.1",
"vue-tsc": "^3.3.2",
"vue-virtual-scroller": "3.0.4"
},
"packageManager": "pnpm@11.3.0"
Expand Down
52 changes: 26 additions & 26 deletions packages/risuko-app/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "@risuko/app",
"version": "0.3.3",
"description": "Risuko download manager — launches the desktop app, downloading it from GitHub Releases on first run",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/YueMiyuki/Risuko.git"
},
"keywords": [
"download",
"torrent",
"bittorrent",
"ed2k",
"m3u8",
"ftp",
"download-manager"
],
"bin": {
"risuko-app": "bin.js"
},
"files": [
"bin.js"
],
"engines": {
"node": ">=22.0.0"
}
"name": "@risuko/app",
"version": "0.3.4",
"description": "Risuko download manager — launches the desktop app, downloading it from GitHub Releases on first run",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/YueMiyuki/Risuko.git"
},
"keywords": [
"download",
"torrent",
"bittorrent",
"ed2k",
"m3u8",
"ftp",
"download-manager"
],
"bin": {
"risuko-app": "bin.js"
},
"files": [
"bin.js"
],
"engines": {
"node": ">=22.0.0"
}
}
36 changes: 18 additions & 18 deletions packages/risuko-cli/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "@risuko/cli-darwin-arm64",
"version": "0.3.3",
"description": "Risuko CLI binary for macOS ARM64",
"repository": {
"type": "git",
"url": "git+https://github.com/YueMiyuki/Risuko.git",
"directory": "packages/risuko-cli/npm/darwin-arm64"
},
"license": "MIT",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"files": [
"risuko"
]
"name": "@risuko/cli-darwin-arm64",
"version": "0.3.4",
"description": "Risuko CLI binary for macOS ARM64",
"repository": {
"type": "git",
"url": "git+https://github.com/YueMiyuki/Risuko.git",
"directory": "packages/risuko-cli/npm/darwin-arm64"
},
"license": "MIT",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"files": [
"risuko"
]
}
Loading
Loading