Skip to content

Commit c75428c

Browse files
committed
ci: cargo deb
Signed-off-by: Thomas Mauran <thomasmauran@yahoo.com>
1 parent 8235e33 commit c75428c

File tree

10 files changed

+26
-158
lines changed

10 files changed

+26
-158
lines changed

.github/workflows/generate-blog-post.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,33 @@ jobs:
6060
"${{ steps.release-info.outputs.title }}" \
6161
"${{ steps.release-info.outputs.body }}"
6262
63+
- name: Configure Git
64+
run: |
65+
git config --global user.name 'github-actions[bot]'
66+
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
67+
6368
- name: Create branch and commit blog post
6469
id: commit
6570
run: |
66-
git config --local user.email "action@github.com"
67-
git config --local user.name "GitHub Action"
71+
# Ensure we're on main and up to date
72+
git checkout main
73+
git pull origin main
6874
6975
BRANCH_NAME="docs/release-${{ steps.release-info.outputs.version }}-blog-post"
7076
git checkout -b "$BRANCH_NAME"
7177
78+
# Only add blog post files, explicitly avoid workflow files
7279
git add website/blog/*.md
80+
81+
# Check if there are any staged changes
7382
if git diff --staged --quiet; then
7483
echo "No changes to commit"
7584
echo "has_changes=false" >> $GITHUB_OUTPUT
7685
else
86+
# Verify we're only committing blog files
87+
STAGED_FILES=$(git diff --staged --name-only)
88+
echo "Staged files: $STAGED_FILES"
89+
7790
git commit -m "docs: add blog post for release ${{ steps.release-info.outputs.version }}"
7891
git push -u origin "$BRANCH_NAME"
7992
echo "has_changes=true" >> $GITHUB_OUTPUT

.github/workflows/release_binary.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,22 @@ jobs:
8383
- uses: dtolnay/rust-toolchain@stable
8484
name: Install the Rust toolchain
8585

86-
- name: Install Debian packaging dependencies
87-
run: |
88-
sudo apt-get update
89-
sudo apt-get install -y \
90-
devscripts \
91-
debhelper \
92-
dh-cargo \
93-
libssl-dev \
94-
pkg-config
86+
- name: Install ALSA development libraries
87+
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
88+
89+
- name: Install cargo-deb
90+
run: cargo install cargo-deb
91+
92+
- uses: Swatinem/rust-cache@v2
93+
name: Use cached dependencies and artifacts
9594

9695
- name: Build Debian package
97-
run: ./scripts/build-deb.sh dh-cargo
96+
run: cargo deb
9897

9998
- name: Find generated .deb
10099
id: find_deb
101100
run: |
102-
DEB_PATH=$(ls -1 ../chess-tui_*.deb | head -n 1)
101+
DEB_PATH=$(find target/debian -name "*.deb" | head -n 1)
103102
echo "deb_path=$DEB_PATH" >> "$GITHUB_OUTPUT"
104103
105104
- uses: softprops/action-gh-release@v2

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ strip = true
4343
# Configuration for cargo-deb (alternative packaging method)
4444
# Install with: cargo install cargo-deb
4545
# Build with: cargo deb
46-
maintainer = "Thomas Mauran <thomas.mauran@example.com>"
46+
maintainer = "Thomas Mauran <thomasmauran@yahoo.com>"
4747
copyright = "2023-2025, Thomas Mauran"
4848
license-file = ["LICENSE"]
4949
extended-description = """\

debian/changelog

Lines changed: 0 additions & 6 deletions
This file was deleted.

debian/compat

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/control

Lines changed: 0 additions & 28 deletions
This file was deleted.

debian/copyright

Lines changed: 0 additions & 29 deletions
This file was deleted.

debian/rules

Lines changed: 0 additions & 19 deletions
This file was deleted.

debian/source/format

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/build-deb.sh

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)