Polish dual-pane UX: bidirectional scroll, stable preview, smarter na… #35
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 | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '6.7.*' | |
| host: windows | |
| target: desktop | |
| arch: win64_msvc2019_64 | |
| modules: qtwebengine qtwebchannel qtpositioning | |
| cache: true | |
| - name: Configure | |
| run: > | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| -DWINDOWN_USE_WEBVIEW2=OFF | |
| -G "Visual Studio 17 2022" -A x64 | |
| - name: Build | |
| run: cmake --build build --config Release --parallel | |
| - name: Test | |
| run: ctest --test-dir build --build-config Release --output-on-failure --timeout 120 | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| - name: Deploy | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Path deploy | |
| Copy-Item build\Release\WinDown3000.exe deploy\ | |
| & windeployqt deploy\WinDown3000.exe --release --no-translations --no-opengl-sw --no-system-d3d-compiler | |
| Compress-Archive -Path deploy\* -DestinationPath WinDown3000-Windows-x64.zip | |
| - name: Single-file exe (7-Zip SFX) | |
| shell: pwsh | |
| run: | | |
| choco install 7zip -y --no-progress | |
| & "C:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 -ms=on app.7z .\deploy\* | |
| $sfx = [System.IO.File]::ReadAllBytes("C:\Program Files\7-Zip\7z.sfx") | |
| $cfg = [System.IO.File]::ReadAllBytes("installer\sfx_config.txt") | |
| $arc = [System.IO.File]::ReadAllBytes("app.7z") | |
| $out = New-Object byte[] ($sfx.Length + $cfg.Length + $arc.Length) | |
| [System.Buffer]::BlockCopy($sfx, 0, $out, 0, $sfx.Length) | |
| [System.Buffer]::BlockCopy($cfg, 0, $out, $sfx.Length, $cfg.Length) | |
| [System.Buffer]::BlockCopy($arc, 0, $out, $sfx.Length + $cfg.Length, $arc.Length) | |
| [System.IO.File]::WriteAllBytes("WinDown3000-SingleFile.exe", $out) | |
| - name: Installer | |
| shell: pwsh | |
| run: | | |
| choco install innosetup -y --no-progress | |
| & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\windown3000.iss | |
| continue-on-error: true | |
| - uses: actions/upload-artifact@v4 | |
| with: { name: WinDown3000-Windows-x64-zip, path: WinDown3000-Windows-x64.zip } | |
| - uses: actions/upload-artifact@v4 | |
| with: { name: WinDown3000-SingleFile, path: WinDown3000-SingleFile.exe } | |
| - uses: actions/upload-artifact@v4 | |
| if: hashFiles('installer/Output/WinDown3000-Setup.exe') != '' | |
| with: { name: WinDown3000-Setup, path: installer/Output/WinDown3000-Setup.exe } | |
| continue-on-error: true | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '6.7.*' | |
| host: mac | |
| target: desktop | |
| arch: clang_64 | |
| modules: qtwebengine qtwebchannel qtpositioning | |
| cache: true | |
| - name: Configure | |
| run: > | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| -DWINDOWN_USE_WEBVIEW2=OFF | |
| - name: Build | |
| run: cmake --build build --config Release --parallel | |
| - name: Test | |
| run: ctest --test-dir build --build-config Release --output-on-failure --timeout 120 | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| - name: Create .app bundle | |
| run: | | |
| mkdir -p WinDown3000.app/Contents/MacOS | |
| mkdir -p WinDown3000.app/Contents/Resources | |
| cp build/WinDown3000 WinDown3000.app/Contents/MacOS/ | |
| # Create Info.plist | |
| cat > WinDown3000.app/Contents/Info.plist << 'PLIST' | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleExecutable</key> | |
| <string>WinDown3000</string> | |
| <key>CFBundleIdentifier</key> | |
| <string>com.windown3000.app</string> | |
| <key>CFBundleName</key> | |
| <string>WinDown 3000</string> | |
| <key>CFBundleVersion</key> | |
| <string>3000.0.6</string> | |
| <key>CFBundleShortVersionString</key> | |
| <string>3000.0.6</string> | |
| <key>CFBundlePackageType</key> | |
| <string>APPL</string> | |
| <key>LSMinimumSystemVersion</key> | |
| <string>11.0</string> | |
| <key>CFBundleDocumentTypes</key> | |
| <array> | |
| <dict> | |
| <key>CFBundleTypeExtensions</key> | |
| <array> | |
| <string>md</string> | |
| <string>markdown</string> | |
| <string>mdown</string> | |
| <string>mkd</string> | |
| <string>txt</string> | |
| </array> | |
| <key>CFBundleTypeName</key> | |
| <string>Markdown Document</string> | |
| <key>CFBundleTypeRole</key> | |
| <string>Editor</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| </plist> | |
| PLIST | |
| - name: Deploy Qt frameworks | |
| run: | | |
| macdeployqt WinDown3000.app -verbose=1 | |
| # Create DMG | |
| hdiutil create -volname "WinDown 3000" -srcfolder WinDown3000.app \ | |
| -ov -format UDZO WinDown3000-macOS.dmg | |
| - uses: actions/upload-artifact@v4 | |
| with: { name: WinDown3000-macOS-dmg, path: WinDown3000-macOS.dmg } | |
| release: | |
| needs: [build-windows, build-macos] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: { name: WinDown3000-Windows-x64-zip } | |
| - uses: actions/download-artifact@v4 | |
| with: { name: WinDown3000-SingleFile } | |
| - uses: actions/download-artifact@v4 | |
| with: { name: WinDown3000-macOS-dmg } | |
| - uses: actions/download-artifact@v4 | |
| with: { name: WinDown3000-Setup } | |
| continue-on-error: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "WinDown 3000 ${{ github.ref_name }}" | |
| files: | | |
| WinDown3000-SingleFile.exe | |
| WinDown3000-Windows-x64.zip | |
| WinDown3000-macOS.dmg | |
| WinDown3000-Setup.exe | |
| fail_on_unmatched_files: false | |
| generate_release_notes: true | |
| body: | | |
| ## WinDown 3000 ${{ github.ref_name }} | |
| A fast, lightweight Markdown viewer and editor. | |
| ### Downloads | |
| | File | Platform | Description | | |
| |------|----------|-------------| | |
| | **WinDown3000-macOS.dmg** | macOS | Drag to Applications and run | | |
| | **WinDown3000-SingleFile.exe** | Windows | Single-file portable exe — just download and run | | |
| | **WinDown3000-Windows-x64.zip** | Windows | Portable zip — extract and run | | |
| | **WinDown3000-Setup.exe** | Windows | Installer with Start Menu and .md file association | | |
| ### Requirements | |
| - **macOS**: 11.0 (Big Sur) or later | |
| - **Windows**: 10 or later (x64) |