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