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