ci(release): PyPI Trusted Publishing 릴리스 워크플로우 추가 #67
Workflow file for this run
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: tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # v* 태그는 release.yml이 처리한다 (테스트 → 빌드 → PyPI 배포) | |
| jobs: | |
| lint: | |
| name: lint (ruff + mypy) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install (with dev extras) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Ruff (lint) | |
| run: ruff check document_adapter | |
| - name: Mypy (type-check) | |
| run: mypy | |
| smoke: | |
| name: smoke (py${{ matrix.python }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| cache: pip | |
| - name: Install (with dev extras — fixture 생성용 python-hwpx 포함) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run tests (smoke + 시나리오/보안 회귀, 전부 동적 생성) | |
| run: pytest tests/ -v | |
| build: | |
| name: build wheel + sdist | |
| runs-on: ubuntu-latest | |
| needs: smoke | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build | |
| run: pip install build twine | |
| - name: Build | |
| run: python -m build | |
| - name: Verify metadata | |
| run: twine check dist/* | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ github.sha }} | |
| path: dist/ | |
| retention-days: 7 |