Merge pull request 'build: add minimal hatch build CI' (#19) from iss… #1
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 package | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Create virtual environment | |
| run: | | |
| python -m venv .venv | |
| ./.venv/bin/python -m pip install --upgrade pip | |
| ./.venv/bin/python -m pip install hatch | |
| - name: Show Python and hatch versions | |
| run: | | |
| ./.venv/bin/python --version | |
| ./.venv/bin/python -m pip --version | |
| ./.venv/bin/hatch --version | |
| - name: Build sdist and wheel | |
| run: ./.venv/bin/hatch build -t sdist -t wheel | |
| - name: Verify artifacts exist | |
| run: ls -l dist/*.whl dist/*.tar.gz | |
| - name: Upload dist artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ |