Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
105 changes: 105 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,112 @@ 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.

- 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 --no-frozen-lockfile
Comment thread
YueMiyuki marked this conversation as resolved.
Outdated

- name: Build Android release APKs
run: pnpm android:build
env:
ANDROID_NDK_VERSION: 27.2.12479018
ANDROID_API_LEVEL: 35
Comment thread
YueMiyuki marked this conversation as resolved.
Outdated

- 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
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
7 changes: 6 additions & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion packages/risuko-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/app",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko download manager — launches the desktop app, downloading it from GitHub Releases on first run",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-cli/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-darwin-arm64",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko CLI binary for macOS ARM64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-cli/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-darwin-x64",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko CLI binary for macOS x64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-cli/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-linux-arm64-gnu",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko CLI binary for Linux ARM64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-cli/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-linux-x64-gnu",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko CLI binary for Linux x64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-cli/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-win32-arm64-msvc",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko CLI binary for Windows ARM64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-cli/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-win32-x64-msvc",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko CLI binary for Windows x64",
"repository": {
"type": "git",
Expand Down
14 changes: 7 additions & 7 deletions packages/risuko-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko download engine CLI — multi-protocol downloads (HTTP, BitTorrent, ED2K, M3U8, FTP/SFTP)",
"license": "MIT",
"repository": {
Expand All @@ -24,12 +24,12 @@
"bin.js"
],
"optionalDependencies": {
"@risuko/cli-darwin-arm64": "0.3.3",
"@risuko/cli-darwin-x64": "0.3.3",
"@risuko/cli-linux-arm64-gnu": "0.3.3",
"@risuko/cli-linux-x64-gnu": "0.3.3",
"@risuko/cli-win32-arm64-msvc": "0.3.3",
"@risuko/cli-win32-x64-msvc": "0.3.3"
"@risuko/cli-darwin-arm64": "0.3.4",
"@risuko/cli-darwin-x64": "0.3.4",
"@risuko/cli-linux-arm64-gnu": "0.3.4",
"@risuko/cli-linux-x64-gnu": "0.3.4",
"@risuko/cli-win32-arm64-msvc": "0.3.4",
"@risuko/cli-win32-x64-msvc": "0.3.4"
},
"engines": {
"node": ">= 18"
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-js/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-darwin-arm64",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko JS native module for macOS ARM64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-js/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-darwin-x64",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko JS native module for macOS x64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-js/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-linux-arm64-gnu",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko JS native module for Linux ARM64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-js/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-linux-x64-gnu",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko JS native module for Linux x64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-js/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-win32-arm64-msvc",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko JS native module for Windows ARM64",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/risuko-js/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-win32-x64-msvc",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko JS native module for Windows x64",
"repository": {
"type": "git",
Expand Down
14 changes: 7 additions & 7 deletions packages/risuko-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@risuko/risuko-js",
"version": "0.3.3",
"version": "0.3.4",
"description": "Risuko download engine — Node.js native bindings for multi-protocol downloads (HTTP, BitTorrent, ED2K, M3U8, FTP/SFTP)",
"main": "index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -34,12 +34,12 @@
}
},
"optionalDependencies": {
"@risuko/js-darwin-arm64": "0.3.3",
"@risuko/js-darwin-x64": "0.3.3",
"@risuko/js-linux-x64-gnu": "0.3.3",
"@risuko/js-linux-arm64-gnu": "0.3.3",
"@risuko/js-win32-x64-msvc": "0.3.3",
"@risuko/js-win32-arm64-msvc": "0.3.3"
"@risuko/js-darwin-arm64": "0.3.4",
"@risuko/js-darwin-x64": "0.3.4",
"@risuko/js-linux-x64-gnu": "0.3.4",
"@risuko/js-linux-arm64-gnu": "0.3.4",
"@risuko/js-win32-x64-msvc": "0.3.4",
"@risuko/js-win32-arm64-msvc": "0.3.4"
},
"engines": {
"node": ">= 18"
Expand Down
13 changes: 13 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@ allowBuilds:
esbuild: true
unrs-resolver: true
vue-demi: true
minimumReleaseAgeExclude:
- '@risuko/cli-darwin-arm64@0.3.3'
- '@risuko/cli-darwin-x64@0.3.3'
- '@risuko/cli-linux-arm64-gnu@0.3.3'
- '@risuko/cli-linux-x64-gnu@0.3.3'
- '@risuko/cli-win32-arm64-msvc@0.3.3'
- '@risuko/cli-win32-x64-msvc@0.3.3'
- '@risuko/js-darwin-arm64@0.3.3'
- '@risuko/js-darwin-x64@0.3.3'
- '@risuko/js-linux-arm64-gnu@0.3.3'
- '@risuko/js-linux-x64-gnu@0.3.3'
- '@risuko/js-win32-arm64-msvc@0.3.3'
- '@risuko/js-win32-x64-msvc@0.3.3'
Comment thread
YueMiyuki marked this conversation as resolved.
Outdated
Loading
Loading