|
79 | 79 | include: |
80 | 80 | - os: windows-latest |
81 | 81 | TARGET: windows |
82 | | - - os: ubuntu-latest |
83 | | - TARGET: linux |
84 | 82 | - os: macos-latest |
85 | 83 | TARGET: macos |
86 | 84 |
|
@@ -109,69 +107,7 @@ jobs: |
109 | 107 | pyinstaller --name "KnowEmail" --onefile --windowed --icon "favicon.ico" --add-data "src;src" --add-data "lib;lib" main.py |
110 | 108 | mv dist/KnowEmail.exe dist/KnowEmail-${{ needs.create-tag.outputs.new_tag }}-windows.exe |
111 | 109 |
|
112 | | - # --- Linux Build --- |
113 | | - - name: Build Linux |
114 | | - if: matrix.os == 'ubuntu-latest' |
115 | | - run: | |
116 | | - # Use colon for separator on Linux |
117 | | - pyinstaller --name "KnowEmail" --onefile --windowed --icon "favicon.ico" --add-data "src:src" --add-data "lib:lib" main.py |
118 | | -
|
119 | | - - name: Package Linux (AppImage & Deb) |
120 | | - if: matrix.os == 'ubuntu-latest' |
121 | | - run: | |
122 | | - TAG_NAME="${{ needs.create-tag.outputs.new_tag }}" |
123 | | - # Remove 'v' for deb version |
124 | | - VERSION_NUM=${TAG_NAME#v} |
125 | | - |
126 | | - # Create AppDir structure for AppImage and Deb |
127 | | - mkdir -p AppDir/usr/bin |
128 | | - mkdir -p AppDir/usr/share/applications |
129 | | - mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps |
130 | | - |
131 | | - # Copy binary |
132 | | - cp dist/KnowEmail AppDir/usr/bin/knowemail |
133 | | - chmod +x AppDir/usr/bin/knowemail |
134 | | - |
135 | | - # Copy icon |
136 | | - cp favicon.ico AppDir/knowemail.png |
137 | | - cp favicon.ico AppDir/usr/share/icons/hicolor/256x256/apps/knowemail.png |
138 | | - |
139 | | - # Create Desktop file |
140 | | - cat > AppDir/usr/share/applications/knowemail.desktop <<EOF |
141 | | - [Desktop Entry] |
142 | | - Type=Application |
143 | | - Name=KnowEmail |
144 | | - Exec=knowemail |
145 | | - Icon=knowemail |
146 | | - Categories=Utility; |
147 | | - EOF |
148 | | - |
149 | | - # Copy desktop file to root of AppDir for AppImage |
150 | | - cp AppDir/usr/share/applications/knowemail.desktop AppDir/knowemail.desktop |
151 | | - cp AppDir/knowemail.png AppDir/.DirIcon |
152 | 110 |
|
153 | | - # --- AppImage --- |
154 | | - wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage |
155 | | - chmod +x linuxdeploy-x86_64.AppImage |
156 | | - |
157 | | - # Run linuxdeploy |
158 | | - ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage |
159 | | - |
160 | | - # Move and Rename AppImage |
161 | | - mv KnowEmail-*.AppImage dist/KnowEmail-${TAG_NAME}-linux.AppImage |
162 | | -
|
163 | | - # --- Deb --- |
164 | | - # Install fpm |
165 | | - sudo apt-get update |
166 | | - sudo apt-get install -y ruby ruby-dev rubygems build-essential |
167 | | - sudo gem install --no-document fpm |
168 | | - |
169 | | - fpm -s dir -t deb \ |
170 | | - -n knowemail \ |
171 | | - -v ${VERSION_NUM} \ |
172 | | - -p dist/KnowEmail-${TAG_NAME}-linux.deb \ |
173 | | - --prefix / \ |
174 | | - -C AppDir |
175 | 111 |
|
176 | 112 | # --- macOS Build --- |
177 | 113 | - name: Build macOS |
@@ -205,7 +141,5 @@ jobs: |
205 | 141 | tag_name: ${{ needs.create-tag.outputs.new_tag }} |
206 | 142 | files: | |
207 | 143 | dist/KnowEmail-*-windows.exe |
208 | | - dist/KnowEmail-*-linux.AppImage |
209 | | - dist/KnowEmail-*-linux.deb |
210 | 144 | dist/KnowEmail-*-macos.dmg |
211 | 145 | dist/KnowEmail-*-macos.app.zip |
0 commit comments