-
-
Notifications
You must be signed in to change notification settings - Fork 141
134 lines (116 loc) · 3.81 KB
/
Copy pathappimage.yml
File metadata and controls
134 lines (116 loc) · 3.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: AppImage
on:
schedule:
- cron: "0 20 * * *"
workflow_dispatch:
jobs:
build-appimage:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
ruby \
qmake6 \
libqt6core6 \
libqt6gui6 \
libqt6svg6-dev \
libqt6core5compat6-dev \
zlib1g-dev \
libgl1-mesa-dev \
libssl-dev \
libcurl4-openssl-dev \
qt6-base-dev \
qt6-svg-dev \
wget \
fuse \
desktop-file-utils
- name: Prepare environment
run: ruby prepare.rb
- name: Build libfiletype
run: |
cd filetype
bash build-gcc.sh
cd ..
- name: Build IncrementalSearchPlugin
run: |
cd subprojects/IncrementalSearchPlugin
bash build-gcc.sh
cd ..
- name: Build Guitar
run: |
rm -fr _build_guitar
mkdir _build_guitar
cd _build_guitar
qmake6 "CONFIG+=release" ../Guitar.pro
make -j$(nproc)
cd ..
- name: Download linuxdeploy
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
- name: Create AppDir structure
run: |
mkdir -p AppDir/usr/bin
mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
# Copy binary
cp _bin/Guitar AppDir/usr/bin/
# Create desktop file
cat > AppDir/usr/share/applications/guitar.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=Guitar
Comment=Git GUI Client
Exec=Guitar
Icon=guitar
Categories=Development;RevisionControl;
StartupNotify=true
EOF
# Create icon (using a placeholder if no icon exists)
if [ -f "image/guitar.png" ]; then
cp image/guitar.png AppDir/usr/share/icons/hicolor/256x256/apps/guitar.png
else
# Create a simple placeholder icon
convert -size 256x256 xc:blue -fill white -gravity center -pointsize 72 -annotate +0+0 "Guitar" AppDir/usr/share/icons/hicolor/256x256/apps/guitar.png || echo "No convert available, using text file as icon"
echo "Guitar" > AppDir/usr/share/icons/hicolor/256x256/apps/guitar.png
fi
- name: Create AppImage
run: |
export QML_SOURCES_PATHS=""
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
- name: Rename AppImage
run: |
if [ -f "Guitar-x86_64.AppImage" ]; then
if [ "${{ github.ref_type }}" = "tag" ]; then
mv Guitar-x86_64.AppImage Guitar-${{ github.ref_name }}-x86_64.AppImage
else
mv Guitar-x86_64.AppImage Guitar-nightly-x86_64.AppImage
fi
fi
- name: Test AppImage
run: |
ls -la *.AppImage
file *.AppImage
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: guitar-appimage
path: Guitar-*.AppImage
- name: Release AppImage
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: Guitar-*.AppImage
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}