Skip to content

Commit

Permalink
automatic debian package build for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
r4gus committed Mar 10, 2024
1 parent a4d2a5d commit 21cf5df
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@ jobs:
mkdir exe
zig build -Doptimize=ReleaseSmall
cp zig-out/bin/zigenity exe/zigenity-${VERSION}-x86_64
- name: Debian Package
run: |
sudo apt install dpkg debhelper fakeroot
export VERSION="$(cat build.zig.zon | grep -o -E '\b[0-9]+\.[0-9]+\.[0-9]+\b')"
mkdir -p debian/zigenity
cp -r packages/DEBIAN debian/zigenity/
sed -i "s/VERSION/${VERSION}/g" debian/zigenity/DEBIAN/control
mkdir -p debian/zigenity/usr/bin
cp zig-out/bin/zigenity debian/zigenity/usr/bin
dpkg-deb --build debian/zigenity/
- name: Release
run: |
export VERSION="$(cat build.zig.zon | grep -o -E '\b[0-9]+\.[0-9]+\.[0-9]+\b')"
gh release create $VERSION --latest -F "changelog/${VERSION}.md" ./exe/*
gh release create $VERSION --latest -F "changelog/${VERSION}.md" ./exe/* debian/zigenity.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#uses: softprops/action-gh-release@v2
Expand Down
6 changes: 6 additions & 0 deletions packages/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Package: zigenity
Version: VERSION
Architecture: amd64
Maintainer: David P. Sugar <[email protected]>
Description: zigenity is a program, inspired by zenity and implemented in Zig, that allows the creation of dialog boxes from the command line.
Depends: gtk3 (>= 3.0)

0 comments on commit 21cf5df

Please sign in to comment.