YAML · 4583 bytes Raw Blame History
1 name: Build and Release
2
3 on:
4 push:
5 tags:
6 - 'v*'
7 workflow_dispatch: # Allows manual trigger from GitHub UI
8
9 permissions:
10 contents: write # Need write permission to create releases
11
12 jobs:
13 build-windows:
14 runs-on: windows-latest
15 steps:
16 - uses: actions/checkout@v4
17
18 - name: Set up Python
19 uses: actions/setup-python@v4
20 with:
21 python-version: '3.11'
22
23 - name: Install dependencies
24 run: |
25 python -m pip install --upgrade pip
26 pip install -e .
27 pip install pyinstaller
28
29 - name: Build executable
30 run: pyinstaller wulftp.spec
31
32 - name: List dist contents
33 run: |
34 echo "Contents of dist:"
35 dir dist
36 echo "Contents of dist\wulFTP (if exists):"
37 if (Test-Path dist\wulFTP) { dir dist\wulFTP }
38
39 - name: Create archive
40 run: |
41 cd dist
42 if (Test-Path wulFTP.exe) {
43 7z a -tzip wulFTP-windows.zip wulFTP.exe
44 } elseif (Test-Path wulFTP) {
45 7z a -tzip wulFTP-windows.zip wulFTP\*
46 } else {
47 echo "Error: Cannot find wulFTP executable or directory"
48 exit 1
49 }
50
51 - name: Upload artifact
52 uses: actions/upload-artifact@v4
53 with:
54 name: windows-build
55 path: dist/wulFTP-windows.zip
56
57 build-macos:
58 runs-on: macos-latest
59 steps:
60 - uses: actions/checkout@v4
61
62 - name: Set up Python
63 uses: actions/setup-python@v4
64 with:
65 python-version: '3.11'
66
67 - name: Install dependencies
68 run: |
69 python -m pip install --upgrade pip
70 pip install -e .
71 pip install pyinstaller
72
73 - name: Build executable
74 run: pyinstaller wulftp.spec
75
76 - name: Create DMG
77 run: |
78 cd dist
79 hdiutil create -volname "wulFTP" -srcfolder wulFTP.app -ov -format UDZO wulFTP-macos.dmg
80
81 - name: Upload artifact
82 uses: actions/upload-artifact@v4
83 with:
84 name: macos-build
85 path: dist/wulFTP-macos.dmg
86
87 build-linux:
88 runs-on: ubuntu-22.04
89 steps:
90 - uses: actions/checkout@v4
91
92 - name: Set up Python
93 uses: actions/setup-python@v4
94 with:
95 python-version: '3.11'
96
97 - name: Install system dependencies
98 run: |
99 sudo apt-get update
100 sudo apt-get install -y libxcb-xinerama0 libxcb-cursor0
101
102 - name: Install Python dependencies
103 run: |
104 python -m pip install --upgrade pip
105 pip install -e .
106 pip install pyinstaller
107
108 - name: Build executable
109 run: pyinstaller wulftp.spec
110
111 - name: List dist contents
112 run: ls -la dist/
113
114 - name: Make executable
115 run: |
116 if [ -f dist/wulFTP ]; then
117 chmod +x dist/wulFTP
118 elif [ -d dist/wulFTP ]; then
119 chmod +x dist/wulFTP/wulFTP
120 fi
121
122 - name: Create archive
123 run: |
124 cd dist
125 if [ -f wulFTP ]; then
126 tar -czf wulFTP-linux.tar.gz wulFTP
127 else
128 tar -czf wulFTP-linux.tar.gz wulFTP/
129 fi
130
131 - name: Upload artifact
132 uses: actions/upload-artifact@v4
133 with:
134 name: linux-build
135 path: dist/wulFTP-linux.tar.gz
136
137 create-release:
138 needs: [build-windows, build-macos, build-linux]
139 runs-on: ubuntu-latest
140 steps:
141 - uses: actions/checkout@v4
142
143 - name: Download all artifacts
144 uses: actions/download-artifact@v4
145
146 - name: Create Release
147 uses: softprops/action-gh-release@v1
148 with:
149 files: |
150 windows-build/wulFTP-windows.zip
151 macos-build/wulFTP-macos.dmg
152 linux-build/wulFTP-linux.tar.gz
153 body: |
154 # wulFTP Release
155
156 ## Installation Instructions
157
158 ### Windows
159 1. Download `wulFTP-windows.zip`
160 2. Extract the zip file
161 3. Double-click `wulFTP.exe` in the wulFTP folder
162
163 ### macOS
164 1. Download `wulFTP-macos.dmg`
165 2. Open the DMG file
166 3. Drag wulFTP to your Applications folder
167 4. First time: Right-click and select "Open" (to bypass Gatekeeper)
168
169 ### Linux
170 1. Download `wulFTP-linux.tar.gz`
171 2. Extract: `tar -xzf wulFTP-linux.tar.gz`
172 3. Run: `./wulFTP/wulFTP`
173
174 ## Configuration
175 - The app will read SSH hosts from your `~/.ssh/config`
176 - Or use "Custom..." in the dropdown to enter connection details
177 env:
178 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}