Skip to content

Commit 96e7732

Browse files
CopilotRobbyV2
andcommitted
Address comment feedback: update to 2025, improve deb build, add CI deb support
Co-authored-by: RobbyV2 <81977892+RobbyV2@users.noreply.github.com>
1 parent bd0f41e commit 96e7732

2 files changed

Lines changed: 54 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,41 @@ jobs:
8181
retention-days: 7
8282
if-no-files-found: error
8383

84+
build-deb:
85+
name: Build Debian Package
86+
needs: lint
87+
runs-on: ubuntu-latest
88+
89+
steps:
90+
- uses: actions/checkout@v3
91+
92+
- name: Install Rust
93+
uses: actions-rs/toolchain@v1
94+
with:
95+
profile: minimal
96+
toolchain: 1.88.0
97+
override: true
98+
99+
- name: Install Just
100+
run: cargo install just
101+
102+
- name: Install dpkg-dev
103+
run: sudo apt-get update && sudo apt-get install -y dpkg-dev
104+
105+
- name: Build .deb package
106+
run: just build-deb
107+
108+
- name: Upload .deb Artifact
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: tuitype-deb
112+
path: releases/*.deb
113+
retention-days: 7
114+
if-no-files-found: error
115+
84116
publish:
85117
name: Publish Release
86-
needs: build
118+
needs: [build, build-deb]
87119
runs-on: ubuntu-latest
88120
permissions:
89121
contents: write
@@ -122,11 +154,18 @@ jobs:
122154
name: tuitype-x86_64-unknown-linux-gnu
123155
path: artifacts/linux
124156

157+
- name: Download Debian Package
158+
uses: actions/download-artifact@v4
159+
with:
160+
name: tuitype-deb
161+
path: artifacts/deb
162+
125163
- name: Prepare Release Files
126164
run: |
127165
mkdir -p release
128166
cp artifacts/windows/tuitype-x64.exe release/
129167
cp artifacts/linux/tuitype-linux-x64 release/
168+
cp artifacts/deb/*.deb release/
130169
chmod +x release/tuitype-linux-x64
131170
132171
- name: Create Release and Upload Assets
@@ -141,4 +180,5 @@ jobs:
141180
See the full changelog: https://github.com/${{ github.repository }}/compare/${{ env.TAG_NAME }}~1...${{ env.TAG_NAME }}
142181
files: |
143182
release/tuitype-x64.exe
144-
release/tuitype-linux-x64
183+
release/tuitype-linux-x64
184+
release/*.deb

justfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,13 @@ build-deb:
236236
#!/usr/bin/env bash
237237
set -e
238238
239+
# Check if dpkg-deb is available
240+
if ! command -v dpkg-deb &> /dev/null; then
241+
echo "Error: dpkg-deb is not available. Please install dpkg-dev package."
242+
echo "On Ubuntu/Debian: sudo apt-get install dpkg-dev"
243+
exit 1
244+
fi
245+
239246
# Get version from Cargo.toml
240247
VERSION=$(grep '^version =' Cargo.toml | cut -d '"' -f 2)
241248
PACKAGE_NAME="tuitype"
@@ -339,7 +346,7 @@ build-deb:
339346
Source: https://github.com/RobbyV2/TuiType
340347
341348
Files: *
342-
Copyright: 2024 RobbyV2
349+
Copyright: 2025 RobbyV2
343350
License: MIT
344351
345352
License: MIT
@@ -364,7 +371,7 @@ build-deb:
364371
365372
# Create simple man page
366373
cat > "$PACKAGE_DIR/usr/share/man/man1/tuitype.1" <<'EOF'
367-
.TH TUITYPE 1 "2024" "TuiType" "User Commands"
374+
.TH TUITYPE 1 "2025" "TuiType" "User Commands"
368375
.SH NAME
369376
tuitype \- terminal-based typing test application
370377
.SH SYNOPSIS
@@ -384,7 +391,7 @@ build-deb:
384391
.SH "REPORTING BUGS"
385392
Report bugs to: https://github.com/RobbyV2/TuiType/issues
386393
.SH COPYRIGHT
387-
Copyright \(co 2024 RobbyV2.
394+
Copyright \(co 2025 RobbyV2.
388395
License MIT: <https://opensource.org/licenses/MIT>.
389396
This is free software: you are free to change and redistribute it.
390397
There is NO WARRANTY, to the extent permitted by law.
@@ -394,14 +401,14 @@ build-deb:
394401
gzip -9n "$PACKAGE_DIR/usr/share/man/man1/tuitype.1"
395402
396403
# Create changelog
397-
cat > "$PACKAGE_DIR/usr/share/doc/$PACKAGE_NAME/changelog.Debian.gz" <<EOF
404+
cat > "$PACKAGE_DIR/usr/share/doc/$PACKAGE_NAME/changelog.Debian" <<EOF
398405
$PACKAGE_NAME ($VERSION) unstable; urgency=medium
399406
400407
* New upstream release.
401408
402409
-- RobbyV2 <robbyv2@example.com> $(date -R)
403410
EOF
404-
gzip -9n "$PACKAGE_DIR/usr/share/doc/$PACKAGE_NAME/changelog.Debian.gz"
411+
gzip -9n "$PACKAGE_DIR/usr/share/doc/$PACKAGE_NAME/changelog.Debian"
405412
406413
# Build the .deb package
407414
echo "Building .deb package..."

0 commit comments

Comments
 (0)