Skip to content

Commit 708a625

Browse files
Update release.yml
1 parent cead7d5 commit 708a625

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

.github/workflows/release.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,77 @@ jobs:
8383
name: customfetch-gui
8484
path: ./customfetch-gui.tar.gz
8585

86+
build-deb:
87+
runs-on: ubuntu-latest
88+
89+
steps:
90+
- uses: actions/checkout@v4
91+
92+
- name: create tmp directory
93+
run: mkdir /tmp/customfetch-0.8.6.orig
94+
95+
- name: Install Packages
96+
run: |
97+
sudo apt-get update
98+
sudo apt-get upgrade -y
99+
sudo apt-get install libwayland-dev libarchive-tools
100+
sudo apt-get install binutils lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
101+
102+
- name: Clean
103+
run: make clean
104+
105+
- name: Create deb
106+
run: |
107+
cp -r $GITHUB_WORKSPACE /tmp/customfetch-0.8.6.orig
108+
cd /tmp/customfetch-0.8.6.orig/customfetch
109+
mkdir -p Debian/Debhelper/Buildsystem/
110+
wget https://github.com/Debian/debhelper/raw/master/lib/Debian/Debhelper/Buildsystem/makefile.pm -O Debian/Debhelper/Buildsystem/make.pm
111+
sed -i "s#package Debian::Debhelper::Buildsystem::makefile#package Debian::Debhelper::Buildsystem::make#g" Debian/Debhelper/Buildsystem/make.pm
112+
dpkg-buildpackage -us -uc
113+
mv ../customfetch_0.8.6-1_amd64.deb ../customfetch_amd64.deb
114+
115+
- name: Upload to github artifacts
116+
uses: actions/upload-artifact@v3
117+
with:
118+
name: customfetch-deb-pkg
119+
path: /tmp/customfetch-0.8.6.orig/customfetch_amd64.deb
120+
121+
build-deb-gui:
122+
runs-on: ubuntu-latest
123+
124+
steps:
125+
- uses: actions/checkout@v4
126+
127+
- name: create tmp directory
128+
run: mkdir /tmp/customfetch-0.8.6.orig
129+
130+
- name: Install Packages
131+
run: |
132+
sudo apt-get update
133+
sudo apt-get upgrade -y
134+
sudo apt-get install libwayland-dev libgtk-3-dev pkg-config libgtkmm-3.0-dev libarchive-tools
135+
sudo apt-get install binutils lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
136+
137+
- name: Clean
138+
run: make clean
139+
140+
- name: Create deb
141+
run: |
142+
cp -r $GITHUB_WORKSPACE /tmp/customfetch-0.8.6.orig
143+
cd /tmp/customfetch-0.8.6.orig/customfetch
144+
mkdir -p Debian/Debhelper/Buildsystem/
145+
wget https://github.com/Debian/debhelper/raw/master/lib/Debian/Debhelper/Buildsystem/makefile.pm -O Debian/Debhelper/Buildsystem/make.pm
146+
sed -i "s#package Debian::Debhelper::Buildsystem::makefile#package Debian::Debhelper::Buildsystem::make#g" Debian/Debhelper/Buildsystem/make.pm
147+
sed -i "s#GUI_MODE=0#GUI_MODE=1#g" debian/rules
148+
dpkg-buildpackage -us -uc
149+
mv ../customfetch_0.8.6-1_amd64.deb ../customfetch-gui_amd64.deb
150+
151+
- name: Upload to github artifacts
152+
uses: actions/upload-artifact@v3
153+
with:
154+
name: customfetch-gui-deb-pkg
155+
path: /tmp/customfetch-0.8.6.orig/customfetch-gui_amd64.deb
156+
86157
release:
87158
name: Create GitHub Release
88159
needs: [build, build-gui, get-version]
@@ -132,3 +203,21 @@ jobs:
132203
asset_path: customfetch-gui/customfetch-gui.tar.gz
133204
asset_name: customfetch-gui-${{ needs.get-version.outputs.version }}.tar.gz
134205
asset_content_type: application/tar+gz
206+
207+
- uses: actions/upload-release-asset@v1
208+
env:
209+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
210+
with:
211+
upload_url: ${{ needs.release.outputs.release-url }}
212+
asset_path: customfetch-deb-pkg/customfetch_amd64.deb
213+
asset_name: customfetch_${{ needs.get-version.outputs.version }}_amd64.deb
214+
asset_content_type: application/vnd.debian.binary-package
215+
216+
- uses: actions/upload-release-asset@v1
217+
env:
218+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219+
with:
220+
upload_url: ${{ needs.release.outputs.release-url }}
221+
asset_path: customfetch-gui-deb-pkg/customfetch-gui_amd64.deb
222+
asset_name: customfetch-gui_${{ needs.get-version.outputs.version }}_amd64.deb
223+
asset_content_type: application/vnd.debian.binary-package

0 commit comments

Comments
 (0)