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