From 213f383b54c9a40a351f341c28bbdf03b73f701d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sun, 29 Oct 2023 01:01:13 +0200 Subject: [PATCH] chore(release): update cargo-deb usage --- .github/workflows/cd.yml | 7 ++++++- git-cliff/Cargo.toml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8df4c86bdc..1ad5cfa2ce 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -350,7 +350,12 @@ jobs: run: | # https://github.com/kornelski/cargo-deb/pull/62 sed "/readme = (.*)/d" -E -i git-cliff/Cargo.toml - cargo-deb --strip --manifest-path git-cliff/Cargo.toml -v -o git-cliff-${{ env.RELEASE_VERSION }}.deb + cargo build --release --locked -p git-cliff + mkdir man/ + OUT_DIR=man cargo run --bin git-cliff-mangen + mkdir completions + OUT_DIR=completions cargo run --bin git-cliff-completions + cargo-deb --deb-revision="" --strip -p git-cliff -v -o git-cliff-${{ env.RELEASE_VERSION }}.deb - name: Sign the package run: | echo "${{ secrets.GPG_RELEASE_KEY }}" | base64 --decode > private.key diff --git a/git-cliff/Cargo.toml b/git-cliff/Cargo.toml index a5ac13d445..16f9d07003 100644 --- a/git-cliff/Cargo.toml +++ b/git-cliff/Cargo.toml @@ -63,3 +63,42 @@ assets = [ { source = "completions/git-cliff.fish", dest = "/usr/share/fish/vendor_completions.d/git-cliff.fish", mode = "644" }, { source = "completions/_git-cliff", dest = "/usr/share/zsh/vendor-completions/", mode = "644" }, ] + +[package.metadata.deb] +assets = [ + [ + "target/release/git-cliff", + "usr/bin/", + "755", + ], + [ + "../LICENSE-MIT", + "/usr/share/doc/git-cliff/LICENSE-MIT", + "644", + ], + [ + "../README.md", + "usr/share/doc/git-cliff/README", + "644", + ], + [ + "../man/git-cliff.1", + "/usr/share/man/man1/git-cliff.1", + "644", + ], + [ + "../completions/git-cliff.bash", + "/usr/share/bash-completion/completions/git-cliff", + "644", + ], + [ + "../completions/git-cliff.fish", + "/usr/share/fish/vendor_completions.d/git-cliff.fish", + "644", + ], + [ + "../completions/_git-cliff", + "/usr/share/zsh/vendor-completions/", + "644", + ], +]