Some checks failed
CI / test (push) Has been cancelled
핵심 기능: - 단축근무·표준·반일 등 다양한 근무 패턴 (5개 프리셋 + 사용자 정의) - Windows 이벤트 뷰어 자동 출퇴근 감지 - 30분 단위 연장근무 적립/사용 시스템 - 1.0/0.5/0.25일 연차·반차·반반차 - 자동 점심·저녁·외출·자동 백업·화면 잠금 자동 외출 - 한국 공휴일 자동 등록 (음력 포함, holidays 패키지) - matplotlib 차트 기반 주간/월간/패턴 통계 - 미니 위젯 + 시스템 트레이 통합 - 한국어/English i18n - 자가 업데이트 (updater.exe + Gitea Releases) 아키텍처: - core/ (db, time_calculator, notifier, i18n, version, settings_keys) - ui/ (main_window + 9 dialogs + 3 controllers) - utils/ (backup, lock_detector, debug_log, updater_client, time_format) - tests/ (66 pytest 단위) + 통합/i18n GUI 검증 CI/CD: - .gitea/workflows/ci.yml: push 시 pytest + 통합 테스트 - .gitea/workflows/release.yml: v* 태그 push 시 두 .exe 자동 빌드 + Releases 첨부 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
85 lines
2.9 KiB
YAML
85 lines
2.9 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*' # v1.0.0, v2.1.0 등 태그 push 시 트리거
|
|
|
|
jobs:
|
|
build-and-release:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies + PyInstaller
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: Run unit tests
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
run: |
|
|
pip install pytest
|
|
pytest tests -q
|
|
|
|
- name: Run integration tests
|
|
run: python _integration_test.py
|
|
|
|
- name: Build main.exe
|
|
run: python -m PyInstaller --clean main.spec
|
|
|
|
- name: Build updater.exe
|
|
run: python -m PyInstaller --clean updater.spec
|
|
|
|
- name: Verify both exe exist
|
|
run: |
|
|
if (-not (Test-Path dist/main.exe)) { throw "main.exe missing" }
|
|
if (-not (Test-Path dist/updater.exe)) { throw "updater.exe missing" }
|
|
|
|
- name: Create release archive
|
|
run: |
|
|
New-Item -ItemType Directory -Path dist/release -Force
|
|
Copy-Item dist/main.exe dist/release/
|
|
Copy-Item dist/updater.exe dist/release/
|
|
Compress-Archive -Path dist/release/* -DestinationPath dist/ClockOutCalculator.zip -Force
|
|
|
|
- name: Publish Release (Gitea)
|
|
uses: actions/release-action@main
|
|
with:
|
|
api_key: ${{ secrets.RELEASE_TOKEN }}
|
|
files: |
|
|
dist/main.exe
|
|
dist/updater.exe
|
|
dist/ClockOutCalculator.zip
|
|
|
|
# GitHub Actions 호환 fallback (Gitea Actions에서 동작 안 할 경우)
|
|
# 위 release-action이 실패하면 아래를 활용:
|
|
#
|
|
# - name: Publish Release (manual via API)
|
|
# shell: pwsh
|
|
# env:
|
|
# GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
# GITEA_HOST: https://kindnick-git.duckdns.org
|
|
# OWNER: kindnick
|
|
# REPO: Clock_out_Time_Calculator
|
|
# run: |
|
|
# $tag = $env:GITHUB_REF -replace 'refs/tags/', ''
|
|
# $body = @{ tag_name = $tag; name = $tag; draft = $false } | ConvertTo-Json
|
|
# $headers = @{ Authorization = "token $env:GITEA_TOKEN" }
|
|
# $release = Invoke-RestMethod -Uri "$env:GITEA_HOST/api/v1/repos/$env:OWNER/$env:REPO/releases" `
|
|
# -Method Post -Headers $headers -ContentType 'application/json' -Body $body
|
|
# $uploadUrl = "$env:GITEA_HOST/api/v1/repos/$env:OWNER/$env:REPO/releases/$($release.id)/assets"
|
|
# foreach ($f in @('dist/main.exe', 'dist/updater.exe')) {
|
|
# $name = [System.IO.Path]::GetFileName($f)
|
|
# Invoke-RestMethod -Uri "$uploadUrl?name=$name" -Method Post `
|
|
# -Headers $headers -InFile $f -ContentType 'application/octet-stream'
|
|
# }
|