CD #2
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: CD | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: '릴리즈 태그 (예: v0.1.0)' | |
| required: true | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| # ── 태그 이름 추출 (공통) ───────────────────────────────────────────────────── | |
| tag-name: | |
| name: Resolve tag name | |
| runs-on: ubuntu-latest | |
| outputs: | |
| name: ${{ steps.tag.outputs.name }} | |
| steps: | |
| - name: 릴리즈 태그 확인 | |
| id: tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "name=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "name=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| fi | |
| # ── 소스 zip 패키지 (Linux) ─────────────────────────────────────────────────── | |
| package-zip: | |
| name: Package zip (Linux) | |
| needs: tag-name | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 코드 체크아웃 | |
| uses: actions/checkout@v4 | |
| - name: uv 설치 | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: latest | |
| - name: 배포 패키지 생성 (소스 전용, GGUF 제외) | |
| run: bash scripts/package_deploy.sh | |
| - name: zip 아티팩트 업로드 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: achat-zip | |
| path: dist/achat.zip | |
| # ── Windows exe 인스톨러 ────────────────────────────────────────────────────── | |
| package-installer: | |
| name: Build Windows Installer | |
| needs: tag-name | |
| runs-on: windows-latest | |
| steps: | |
| - name: 코드 체크아웃 | |
| uses: actions/checkout@v4 | |
| - name: Python 설치 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Inno Setup 6 설치 | |
| run: choco install innosetup --yes --no-progress | |
| shell: pwsh | |
| - name: uv.exe 다운로드 | |
| run: | | |
| New-Item -ItemType Directory -Force -Path deploy\dist | Out-Null | |
| $url = "https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-pc-windows-msvc.zip" | |
| Invoke-WebRequest -Uri $url -OutFile deploy\dist\uv.zip | |
| Expand-Archive -Path deploy\dist\uv.zip -DestinationPath deploy\dist\uv_tmp -Force | |
| Move-Item deploy\dist\uv_tmp\uv.exe deploy\dist\uv.exe -Force | |
| Remove-Item deploy\dist\uv_tmp, deploy\dist\uv.zip -Recurse -Force | |
| shell: pwsh | |
| - name: PyInstaller 설치 및 Achat.exe 빌드 | |
| run: | | |
| python -m pip install --quiet pyinstaller | |
| python -m PyInstaller deploy\achat.spec --distpath deploy\dist --workpath deploy\build --noconfirm | |
| shell: cmd | |
| - name: AchatSetup.exe 빌드 (Inno Setup) | |
| run: | | |
| $iscc = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" | |
| & $iscc "deploy\achat_setup.iss" | |
| shell: pwsh | |
| - name: 인스톨러 아티팩트 업로드 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: achat-installer | |
| path: deploy/dist/AchatSetup.exe | |
| # ── GitHub Release 생성 ─────────────────────────────────────────────────────── | |
| release: | |
| name: GitHub Release | |
| needs: [tag-name, package-zip, package-installer] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: zip 아티팩트 다운로드 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: achat-zip | |
| path: dist | |
| - name: 인스톨러 아티팩트 다운로드 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: achat-installer | |
| path: dist | |
| - name: GitHub Release 생성 및 파일 업로드 | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.tag-name.outputs.name }} | |
| name: "Achat ${{ needs.tag-name.outputs.name }}" | |
| body: | | |
| ## 설치 방법 | |
| ### 방법 A — 설치 마법사 (권장) | |
| 1. `AchatSetup.exe` 다운로드 후 실행 | |
| 2. 설치 경로 지정 (기본: `C:\Achat`) | |
| 3. 마법사 완료 → 자동으로 의존성 설치 + 앱 실행 | |
| 4. `models/` 폴더에 `model_q4km.gguf` 복사 후 재실행 | |
| **제거:** 제어판 → 프로그램 추가/제거 → Achat 제거 | |
| (`.venv`, `chroma_deploy`, 세션 데이터 포함 전체 삭제) | |
| ### 방법 B — 소스 zip (개발자용) | |
| 1. `achat.zip` 다운로드 후 압축 해제 | |
| 2. `models/` 폴더에 `model_q4km.gguf` 복사 | |
| 3. `uv sync` 실행 (최초 1회) | |
| 4. `uv run python main.py` 실행 | |
| ## 모델 파일 (별도 배포) | |
| `model_q4km.gguf` (~2GB) 는 용량 문제로 Release에 포함되지 않습니다. | |
| ``` | |
| # Linux 개발 환경에서 직접 생성 | |
| uv run python scripts/merge_lora.py --adapter output/LoRA_v11/adapter --output_dir output/merged_v11 | |
| bash scripts/convert_to_gguf.sh --merged output/merged_v11 --out_dir output/gguf --llama_cpp ~/llama.cpp | |
| ``` | |
| ## 시스템 요구사항 | |
| - Windows 10/11 (x64) | |
| - Python 3.10+ (방법 B만) | |
| - RAM 4GB 이상 | |
| - AVX2 지원 CPU | |
| files: | | |
| dist/AchatSetup.exe | |
| dist/achat.zip | |
| draft: false | |
| prerelease: ${{ contains(needs.tag-name.outputs.name, '-') }} |