Skip to content

Add building debian package to github actions #1024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 10 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,19 @@ jobs:
rustup target add x86_64-unknown-linux-musl
sudo apt-get -qq install musl-tools

- name: Add cargo deb
if: matrix.os == 'ubuntu-latest'
run: |
cargo install cargo-deb

- name: Build Release Mac
if: matrix.os == 'macos-latest'
run: make release-mac
- name: Build Release Linux
- name: Build Release Linux + Debian package
if: matrix.os == 'ubuntu-latest'
run: make release-linux-musl
run: |
make release-linux-musl
make release-linux-musl-deb
- name: Build Release Win
if: matrix.os == 'windows-latest'
run: make release-win
Expand All @@ -76,6 +83,7 @@ jobs:
./release/*.tar.gz
./release/*.zip
./release/*.msi
./release/*.deb

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ opt-level = 3

[profile.dev]
split-debuginfo = "unpacked"

[package.metadata.deb]
depends = ""
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ release-linux-musl: build-linux-musl-release
mkdir -p release
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-musl.tar.gz ./gitui

release-linux-musl-deb: build-linux-musl-release
cargo deb --no-build --target x86_64-unknown-linux-musl
cp ./target/x86_64-unknown-linux-musl/debian/*.deb ./release/

build-linux-musl-debug:
cargo build --target=x86_64-unknown-linux-musl

Expand Down