Pull out to a separate crate

This commit is contained in:
sxyazi 2025-06-27 16:17:26 +08:00
parent f23b1ecae7
commit b6408827f9
No known key found for this signature in database
6 changed files with 42 additions and 27 deletions

View file

@ -57,8 +57,10 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: yazi-${{ matrix.target }}.zip
path: yazi-${{ matrix.target }}.zip
name: ${{ matrix.target }}
path: |
yazi-${{ matrix.target }}.zip
yazi-${{ matrix.target }}.deb
build-windows:
strategy:
@ -100,7 +102,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: yazi-${{ matrix.target }}.zip
name: ${{ matrix.target }}
path: yazi-${{ matrix.target }}.zip
build-musl:
@ -128,8 +130,10 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: yazi-${{ matrix.target }}.zip
path: yazi-${{ matrix.target }}.zip
name: ${{ matrix.target }}
path: |
yazi-${{ matrix.target }}.zip
yazi-${{ matrix.target }}.deb
build-snap:
strategy:
@ -206,6 +210,7 @@ jobs:
draft: true
files: |
yazi-*.zip
yazi-*.deb
yazi-*.snap
generate_release_notes: true
@ -241,6 +246,7 @@ jobs:
prerelease: true
files: |
yazi-*.zip
yazi-*.deb
yazi-*.snap
name: Nightly Build
body: ${{ env.NIGHTLY_BODY }}

4
Cargo.lock generated
View file

@ -3678,6 +3678,10 @@ dependencies = [
name = "yazi-macro"
version = "25.6.11"
[[package]]
name = "yazi-packing"
version = "25.5.28"
[[package]]
name = "yazi-plugin"
version = "25.6.11"

View file

@ -22,6 +22,5 @@ if ! command -v zip &> /dev/null; then
fi
zip -r "$ARTIFACT_NAME.zip" "$ARTIFACT_NAME"
# build deb package (see https://crates.io/crates/cargo-deb)
## run it after build
cargo deb -p yazi-fm --no-build
# Package deb
cargo deb -p yazi-packing --no-build -o "$ARTIFACT_NAME.deb"

View file

@ -76,22 +76,3 @@ path = "src/main.rs"
[package.metadata.binstall]
pkg-url = "{repo}/releases/download/v{version}/yazi-{target}{archive-suffix}"
bin-dir = "yazi-{target}/{bin}{binary-ext}"
[package.metadata.deb]
license-file = ["../LICENSE", "0"]
extended-description = """
Yazi is a terminal file manager written in Rust, based on non-blocking async
I/O. It aims to provide an efficient, user-friendly, and customizable file
management experience.
"""
depends = "file, ffmpeg, 7zip, jq, poppler-utils, fd-find, ripgrep, fzf, zoxide, imagemagick, xsel|xclip|wl-clipboard"
recommends = "bash-completion"
section = "utility"
priority = "optional"
assets = [
["target/release/ya", "usr/bin/", "755"],
["target/release/yazi", "usr/bin/", "755"],
{ source = "../README.md", dest = "usr/share/doc/yazi-fm/README", mode = "644"},
{ source = "../yazi-cli/completions/ya.bash", dest = "usr/share/bash-completion/completions/ya", mode = "644"},
{ source = "../yazi-boot/completions/yazi.bash", dest = "usr/share/bash-completion/completions/yazi", mode = "644"},
]

25
yazi-packing/Cargo.toml Normal file
View file

@ -0,0 +1,25 @@
[package]
name = "yazi-packing"
version = "25.5.28"
edition = "2024"
license = "MIT"
authors = [ "sxyazi <sxyazi@gmail.com>" ]
description = "Yazi packing"
homepage = "https://yazi-rs.github.io"
repository = "https://github.com/sxyazi/yazi"
[package.metadata.deb]
name = "yazi"
license-file = [ "../LICENSE", "0" ]
depends = "file, ffmpeg, 7zip, jq, poppler-utils, fd-find, ripgrep, fzf, zoxide, imagemagick, xsel|xclip|wl-clipboard"
recommends = "bash-completion"
extended-description-file = "README.md"
section = "utility"
priority = "optional"
assets = [
[ "target/release/ya", "usr/bin/", "755" ],
[ "target/release/yazi", "usr/bin/", "755" ],
[ "../README.md", "usr/share/doc/yazi/README", "644" ],
[ "../yazi-cli/completions/ya.bash", "usr/share/bash-completion/completions/ya", "644" ],
[ "../yazi-boot/completions/yazi.bash", "usr/share/bash-completion/completions/yazi", "644" ],
]

0
yazi-packing/src/lib.rs Normal file
View file