docs: 다운로드 버튼/README 최종 개선 및 macOS 앱 정상 실행 검증 #30
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 Installers | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-macos-dmg: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Prepare virtual environment | |
| run: | | |
| python -m venv .venv | |
| .venv/bin/python -m pip install --upgrade pip | |
| .venv/bin/python -m pip install -r requirements.txt | |
| - name: Ensure launcher executable bit | |
| run: chmod +x "실행.command" "macos/build_installer.command" | |
| - name: Build DMG installer | |
| run: ./macos/build_installer.command | |
| - name: Upload macOS installer artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TOEFLScorer-macOS-dmg | |
| path: dist_macos/TOEFLScorer-macOS.dmg | |
| build-windows-setup: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Inno Setup | |
| shell: powershell | |
| run: choco install innosetup --no-progress -y | |
| - name: Build Setup.exe | |
| shell: powershell | |
| run: | | |
| python -m venv .venv | |
| .\.venv\Scripts\python.exe -m pip install --upgrade pip | |
| .\.venv\Scripts\python.exe -m pip install -r requirements.txt pyinstaller | |
| if (Test-Path dist_windows) { | |
| Remove-Item -Recurse -Force dist_windows | |
| } | |
| .\.venv\Scripts\pyinstaller.exe ` | |
| --noconfirm ` | |
| --clean ` | |
| --windowed ` | |
| --onefile ` | |
| --hidden-import webview ` | |
| --name "TOEFLScorer" ` | |
| --distpath "dist_windows" ` | |
| --paths "." ` | |
| --add-data "app;app" ` | |
| --add-data "static;static" ` | |
| windows\app_launcher.py | |
| $isccCandidates = @( | |
| "$env:ProgramFiles\Inno Setup 6\ISCC.exe", | |
| "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" | |
| ) | |
| $iscc = $null | |
| foreach ($p in $isccCandidates) { | |
| if (Test-Path $p) { | |
| $iscc = $p | |
| break | |
| } | |
| } | |
| if (-not $iscc) { | |
| throw "Inno Setup 6 (ISCC.exe) not found" | |
| } | |
| & $iscc "windows\installer\TOEFLScorer.iss" | |
| - name: Upload Windows installer artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TOEFLScorer-Windows-Setup | |
| path: dist_windows/installer/TOEFLScorer-Setup.exe | |
| - name: Upload Windows portable artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TOEFLScorer-Windows-Portable | |
| path: dist_windows/TOEFLScorer.exe | |
| publish-latest-release: | |
| needs: [build-macos-dmg, build-windows-setup] | |
| runs-on: ubuntu-latest | |
| if: ${{ always() && github.ref == 'refs/heads/main' && (needs.build-macos-dmg.result == 'success' || needs.build-windows-setup.result == 'success') }} | |
| steps: | |
| - name: Download macOS artifact | |
| if: needs.build-macos-dmg.result == 'success' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: TOEFLScorer-macOS-dmg | |
| path: release-assets | |
| - name: Download Windows artifact | |
| if: needs.build-windows-setup.result == 'success' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: TOEFLScorer-Windows-Setup | |
| path: release-assets | |
| - name: Download Windows portable artifact | |
| if: needs.build-windows-setup.result == 'success' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: TOEFLScorer-Windows-Portable | |
| path: release-assets | |
| - name: Publish rolling latest release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: latest | |
| name: Latest Build | |
| body: | | |
| 자동 업데이트 릴리즈입니다. | |
| - macOS DMG | |
| - Windows Setup.exe | |
| - Windows Portable EXE | |
| prerelease: true | |
| allowUpdates: true | |
| removeArtifacts: true | |
| replacesArtifacts: true | |
| artifacts: "release-assets/*" | |
| token: ${{ secrets.GITHUB_TOKEN }} |