diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml index 0cea3b43..8132a77c 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/draft.yml @@ -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 }} diff --git a/Cargo.lock b/Cargo.lock index 8bb8f191..4a66aea2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/scripts/build.sh b/scripts/build.sh index 7afb9729..135506d6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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" diff --git a/yazi-fm/Cargo.toml b/yazi-fm/Cargo.toml index 1abef817..2a71042a 100644 --- a/yazi-fm/Cargo.toml +++ b/yazi-fm/Cargo.toml @@ -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"}, -] diff --git a/yazi-packing/Cargo.toml b/yazi-packing/Cargo.toml new file mode 100644 index 00000000..6f2a275e --- /dev/null +++ b/yazi-packing/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "yazi-packing" +version = "25.5.28" +edition = "2024" +license = "MIT" +authors = [ "sxyazi " ] +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" ], + ] diff --git a/yazi-packing/src/lib.rs b/yazi-packing/src/lib.rs new file mode 100644 index 00000000..e69de29b