Skip to content

Commit 57720a3

Browse files
NeroReflexShadowApex
authored andcommitted
chore: move .deb packaging commands from github CI to Makefile
1 parent 1f609ba commit 57720a3

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.github/workflows/release.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
run: |
158158
export DEBIAN_FRONTEND=noninteractive
159159
apt-get update
160-
apt-get install -y wget git lsb-release wget software-properties-common gnupg curl build-essential devscripts debhelper
160+
apt-get install -y wget git lsb-release software-properties-common gnupg curl build-essential devscripts debhelper
161161
162162
- name: Install build dependencies
163163
id: install-build-deps
@@ -172,17 +172,15 @@ jobs:
172172
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
173173
. $HOME/.cargo/env
174174
175-
- name: Install cargo-deb
176-
run: cargo install cargo-deb
177-
178-
- name: Build Debian package
179-
run: cargo deb
175+
- name: Build deb package
176+
run: |
177+
make dist-deb
180178
181179
- name: Upload Debian package
182180
uses: actions/upload-artifact@v4
183181
with:
184182
name: inputplumber_debian-bookworm.deb
185-
path: target/debian/inputplumber_*.deb
183+
path: dist/inputplumber_*.deb
186184
if-no-files-found: error
187185

188186
publish-to-ubuntu-noble:
@@ -203,7 +201,7 @@ jobs:
203201
run: |
204202
export DEBIAN_FRONTEND=noninteractive
205203
apt-get update
206-
apt-get install -y wget git lsb-release wget software-properties-common gnupg curl build-essential devscripts debhelper
204+
apt-get install -y wget git lsb-release software-properties-common gnupg curl build-essential devscripts debhelper
207205
208206
- name: Install build dependencies
209207
id: install-build-deps
@@ -218,15 +216,13 @@ jobs:
218216
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
219217
. $HOME/.cargo/env
220218
221-
- name: Install cargo-deb
222-
run: cargo install cargo-deb
223-
224-
- name: Build Debian package
225-
run: cargo deb
219+
- name: Build deb package
220+
run: |
221+
make dist-deb
226222
227223
- name: Upload Debian package
228224
uses: actions/upload-artifact@v4
229225
with:
230226
name: inputplumber_ubuntu-noble_amd64.deb
231-
path: target/debian/inputplumber_*.deb
227+
path: dist/inputplumber_*.deb
232228
if-no-files-found: error

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ example:
137137
##@ Distribution
138138

139139
.PHONY: dist
140-
dist: dist/$(NAME)-$(ARCH).tar.gz dist/$(NAME)-$(VERSION)-1.$(ARCH).rpm dist/$(NAME)-$(ARCH).raw ## Create all redistributable versions of the project
140+
dist: dist/$(NAME).tar.gz dist/$(NAME)_$(VERSION)-1_$(ARCH).deb dist/$(NAME)-$(VERSION)-1.$(ARCH).rpm dist/$(NAME).raw ## Create all redistributable versions of the project
141141

142142
.PHONY: dist-archive
143143
dist-archive: dist/$(NAME)-$(ARCH).tar.gz ## Build a redistributable archive of the project
@@ -149,6 +149,15 @@ dist/$(NAME)-$(ARCH).tar.gz: build $(ALL_ROOTFS)
149149
tar cvfz $@ -C $(CACHE_DIR) $(NAME)
150150
cd dist && sha256sum $(NAME)-$(ARCH).tar.gz > $(NAME)-$(ARCH).tar.gz.sha256.txt
151151

152+
.PHONY: dist-deb
153+
dist-deb: dist/$(NAME)_$(VERSION)-1_$(ARCH).deb ## Build a redistributable deb package
154+
dist/$(NAME)_$(VERSION)-1_$(ARCH).deb: target/$(TARGET_ARCH)/release/$(NAME)
155+
mkdir -p dist
156+
cargo install cargo-deb
157+
cargo deb
158+
cp ./target/$(TARGET_ARCH)/debian/$(NAME)_$(VERSION)-1_$(ARCH).deb dist
159+
cd dist && sha256sum $(NAME)_$(VERSION)-1_$(ARCH).deb > $(NAME)_$(VERSION)-1_$(ARCH).deb.sha256.txt
160+
152161
.PHONY: dist-rpm
153162
dist-rpm: dist/$(NAME)-$(VERSION)-1.$(ARCH).rpm ## Build a redistributable RPM package
154163
dist/$(NAME)-$(VERSION)-1.$(ARCH).rpm: target/$(TARGET_ARCH)/release/$(NAME)

0 commit comments

Comments
 (0)