Skip to content

Commit 4fefa30

Browse files
committed
misc: update makefile and workflow
1 parent c1b211c commit 4fefa30

File tree

4 files changed

+50
-12
lines changed

4 files changed

+50
-12
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ jobs:
2121
2222
build:
2323
runs-on: ubuntu-latest
24-
container:
25-
image: archlinux
2624

2725
steps:
2826
- uses: actions/checkout@v4
2927

3028
- name: Install Packages
31-
run: pacman -Syu git base-devel --noconfirm --needed
29+
run: sudo apt-get update && sudo apt upgarde -y && sudo apt-get install build-essential -y
3230

3331
- name: Get submodules
3432
uses: actions/checkout@v4
@@ -42,17 +40,46 @@ jobs:
4240
run: make DEBUG=0 GUI_MODE=0
4341

4442
- name: Make Release
45-
run: make dist DEBUG=0 && mv ./customfetch-*.tar.zst ./customfetch.tar.zst
43+
run: make dist DEBUG=0 && mv ./customfetch-*.tar.gz ./customfetch.tar.gz
4644

4745
- name: Upload to github artifacts
4846
uses: actions/upload-artifact@v3
4947
with:
5048
name: customfetch
51-
path: customfetch.tar.zst
49+
path: customfetch.tar.gz
50+
51+
build-gui:
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
57+
- name: Install Packages
58+
run: sudo apt-get update && sudo apt upgarde -y && sudo apt-get install build-essential libgtk-3-dev pkg-config libgtkmm-3.0-dev -y
59+
60+
- name: Get submodules
61+
uses: actions/checkout@v4
62+
with:
63+
submodules: recursive
64+
65+
- name: Clean
66+
run: make clean
67+
68+
- name: Compile
69+
run: make DEBUG=0 GUI_MODE=1
70+
71+
- name: Make Release
72+
run: make dist DEBUG=0 && mv ./customfetch-*.tar.gz ./customfetch-gui.tar.gz
73+
74+
- name: Upload to github artifacts
75+
uses: actions/upload-artifact@v3
76+
with:
77+
name: customfetch-gui
78+
path: customfetch-gui.tar.gz
5279

5380
release:
5481
name: Create GitHub Release
55-
needs: [build, get-version]
82+
needs: [build, build-gui, get-version]
5683
runs-on: ubuntu-latest
5784
permissions:
5885
contents: write
@@ -77,7 +104,7 @@ jobs:
77104
permissions:
78105
contents: write
79106
steps:
80-
- uses: actions/download-artifact@v3
107+
- uses: actions/download-artifact@v4
81108
with:
82109
name: customfetch
83110

@@ -86,6 +113,15 @@ jobs:
86113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87114
with:
88115
upload_url: ${{ needs.release.outputs.release-url }}
89-
asset_path: ./customfetch.tar.zst
90-
asset_name: customfetch-${{ needs.get-version.outputs.version }}.tar.zst
91-
asset_content_type: application/tar+zstd
116+
asset_path: ./customfetch.tar.gz
117+
asset_name: customfetch-${{ needs.get-version.outputs.version }}.tar.gz
118+
asset_content_type: application/tar+gz
119+
120+
- uses: actions/upload-release-asset@v1
121+
env:
122+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123+
with:
124+
upload_url: ${{ needs.release.outputs.release-url }}
125+
asset_path: ./customfetch-gui.tar.gz
126+
asset_name: customfetch-${{ needs.get-version.outputs.version }}.tar.gz
127+
asset_content_type: application/tar+gz

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ cufetch_r
99
thinkpad-arch_logo.txt
1010
tanjiro_logo.txt
1111

12+
*.tar.*
13+
1214
# Prerequisites
1315
*.d
1416

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $(TARGET): fmt toml $(OBJ)
6565
$(CXX) $(OBJ) $(BUILDDIR)/toml++/toml.o -o $(BUILDDIR)/$(TARGET) $(LDFLAGS)
6666

6767
dist: $(TARGET)
68-
bsdtar -zcf $(NAME)-v$(VERSION).tar.gz LICENSE README.md -C $(BUILDDIR) $(TARGET)
68+
bsdtar -zcf $(NAME)-v$(VERSION).tar.gz LICENSE cufetch.1 assets/ascii/ -C $(BUILDDIR) $(TARGET)
6969

7070
clean:
7171
rm -rf $(BUILDDIR)/$(TARGET) $(OBJ)
@@ -81,6 +81,6 @@ install: $(TARGET)
8181
mkdir -p $(DESTDIR)$(MANPREFIX)/man1/
8282
sed -e "s/@VERSION@/$(VERSION)/g" -e "s/@BRANCH@/$(BRANCH)/g" < cufetch.1 > $(DESTDIR)$(MANPREFIX)/man1/cufetch.1
8383
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/cufetch.1
84-
cd assets/ && find ascii/ -type f -exec install -Dm 755 "{}" "$(DESTDIR)$(PREFIX)/share/customfetch/{}" \;
84+
cd assets/ && find ascii/ -type f -exec install -Dm 644 "{}" "$(DESTDIR)$(PREFIX)/share/customfetch/{}" \;
8585

8686
.PHONY: $(TARGET) dist distclean fmt toml install all
File renamed without changes.

0 commit comments

Comments
 (0)