Add file split and merge functionality with tab-based UI #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build JSON to CSV Converter | ||
| on: | ||
| push: | ||
| branches: [ main, master ] | ||
| tags: | ||
| - 'v*' | ||
| pull_request: | ||
| branches: [ main, master ] | ||
| workflow_dispatch: | ||
| jobs: | ||
| build-macos: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: macos-13 # Intel | ||
| arch: x86_64 | ||
| name: intel | ||
| - os: macos-latest # Apple Silicon | ||
| arch: arm64 | ||
| name: apple-silicon | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install pyinstaller PyQt6 | ||
| - name: Build application | ||
| run: | | ||
| # Create optimized spec file | ||
| cat > json_to_csv_multifile_pyqt.spec << 'EOF' | ||
| # -*- mode: python ; coding: utf-8 -*- | ||
| block_cipher = None | ||
| excluded_modules = [ | ||
| 'PyQt6.QtBluetooth', 'PyQt6.QtDesigner', 'PyQt6.QtHelp', | ||
| 'PyQt6.QtLocation', 'PyQt6.QtMultimedia', 'PyQt6.QtMultimediaWidgets', | ||
| 'PyQt6.QtNetwork', 'PyQt6.QtNfc', 'PyQt6.QtOpenGL', | ||
| 'PyQt6.QtOpenGLWidgets', 'PyQt6.QtPdf', 'PyQt6.QtPdfWidgets', | ||
| 'PyQt6.QtPositioning', 'PyQt6.QtPrintSupport', 'PyQt6.QtQml', | ||
| 'PyQt6.QtQuick', 'PyQt6.QtQuick3D', 'PyQt6.QtQuickWidgets', | ||
| 'PyQt6.QtRemoteObjects', 'PyQt6.QtSensors', 'PyQt6.QtSerialPort', | ||
| 'PyQt6.QtSpatialAudio', 'PyQt6.QtSql', 'PyQt6.QtSvg', | ||
| 'PyQt6.QtSvgWidgets', 'PyQt6.QtTest', 'PyQt6.QtWebChannel', | ||
| 'PyQt6.QtWebEngine', 'PyQt6.QtWebEngineCore', 'PyQt6.QtWebEngineWidgets', | ||
| 'PyQt6.QtWebSockets', 'PyQt6.QtXml', | ||
| 'test', 'unittest', 'xml', 'email', 'html', 'http', 'urllib', | ||
| 'ssl', '_ssl', 'cryptography', 'certifi', 'PIL', 'numpy', 'matplotlib', | ||
| ] | ||
| a = Analysis( | ||
| ['json_to_csv_multifile_pyqt.py'], | ||
| excludes=excluded_modules, | ||
| optimize=2, | ||
| ) | ||
| excluded_binaries = [ | ||
| 'QtNetwork', 'QtPdf', 'QtSvg', 'QtWebEngine', 'QtMultimedia', | ||
| 'QtQml', 'QtQuick', 'QtBluetooth', 'QtPositioning', 'QtSensors', | ||
| 'QtSerialPort', 'QtSql', 'QtTest', 'QtXml', | ||
| ] | ||
| a.binaries = [x for x in a.binaries if not any(excl in x[0] for excl in excluded_binaries)] | ||
| pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) | ||
| exe = EXE( | ||
| pyz, a.scripts, [], | ||
| exclude_binaries=True, | ||
| name='JSON to CSV Converter', | ||
| debug=False, | ||
| strip=True, | ||
| upx=False, | ||
| console=False, | ||
| ) | ||
| coll = COLLECT( | ||
| exe, a.binaries, a.zipfiles, a.datas, | ||
| strip=True, | ||
| upx=False, | ||
| name='JSON to CSV Converter', | ||
| ) | ||
| app = BUNDLE( | ||
| coll, | ||
| name='JSON to CSV Converter.app', | ||
| bundle_identifier='com.simplifi.jsontocsv', | ||
| ) | ||
| EOF | ||
| # Build with optimized spec | ||
| pyinstaller --clean json_to_csv_multifile_pyqt.spec | ||
| - name: Create DMG | ||
| run: | | ||
| # Debug: Check what was created | ||
| echo "Contents of dist directory:" | ||
| ls -la dist/ | ||
| # Verify the app exists | ||
| if [ ! -d "dist/JSON to CSV Converter.app" ]; then | ||
| echo "ERROR: Application not found in dist directory" | ||
| exit 1 | ||
| fi | ||
| # Create a DMG for easier distribution | ||
| mkdir -p dmg_contents | ||
| cp -R "dist/JSON to CSV Converter.app" dmg_contents/ | ||
| # Create Applications symlink | ||
| ln -s /Applications dmg_contents/Applications | ||
| # Create DMG | ||
| hdiutil create -volname "JSON to CSV Converter" \ | ||
| -srcfolder dmg_contents \ | ||
| -ov -format UDZO \ | ||
| "JSON-to-CSV-Converter-${{ matrix.name }}.dmg" | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: JSON-to-CSV-Converter-${{ matrix.name }} | ||
| path: JSON-to-CSV-Converter-${{ matrix.name }}.dmg | ||
| if-no-files-found: error | ||
| create-release: | ||
| needs: build-macos | ||
| runs-on: ubuntu-latest | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| steps: | ||
| - name: Download all artifacts | ||
| uses: actions/download-artifact@v4 | ||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: | | ||
| JSON-to-CSV-Converter-intel/JSON-to-CSV-Converter-intel.dmg | ||
| JSON-to-CSV-Converter-apple-silicon/JSON-to-CSV-Converter-apple-silicon.dmg | ||
| body: | | ||
| ## JSON to CSV Converter | ||
| ### Downloads | ||
| - **Intel Macs**: `JSON-to-CSV-Converter-intel.dmg` | ||
| - **Apple Silicon Macs** (M1/M2/M3): `JSON-to-CSV-Converter-apple-silicon.dmg` | ||
| ### How to check your Mac type | ||
| 1. Click the Apple menu > About This Mac | ||
| 2. Look for "Chip" or "Processor" | ||
| - Intel processor = Download Intel version | ||
| - Apple M1/M2/M3 = Download Apple Silicon version | ||
| ### Installation | ||
| 1. Download the appropriate DMG file | ||
| 2. Double-click to mount it | ||
| 3. Drag the app to your Applications folder | ||
| 4. First time running: Right-click and select "Open" to bypass Gatekeeper | ||
| draft: false | ||
| prerelease: false | ||