chore: manual cruft update #9
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
| # .github/workflows/build-package-python.yml | ||
| # See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | ||
| name: Build Python Package | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "src/**/*.py" | ||
| - "tests/**/*.py" # Test files shouldn't trigger *build* unless needed? Consider paths carefully. | ||
| - "noxfile.py" # Build task config | ||
| - "pyproject.toml" # Packaging config (metadata, deps, build system) | ||
| - ".github/workflows/build-package-python.yml" # This workflow file | ||
| - "rust/**/*.rs" | ||
| # Add paths to other relevant build-related files (e.g., manifest files) | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| paths: | ||
| - "src/**/*.py" | ||
| - "tests/**/*.py" | ||
| - "noxfile.py" | ||
| - "pyproject.toml" | ||
| - ".github/workflows/build-package-python.yml" | ||
| # This workflow is also triggered explicitly as part of the CD workflow. | ||
| # workflow_dispatch: # Remove if only triggered by push/PR or other workflows | ||
| jobs: | ||
| build-package-python: | ||
| name: Run Python Package Build Check on ${{ matrix.os }} | ||
| # Building pure Python packages should work reliably across OSs. | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version-file: ".github\workflows\.python-version" | ||
| - name: Run package build | ||
| run: uvx nox -s build-python | ||
| - name: Upload built packages artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: distribution-packages-${{ github.event.inputs.tag }} | ||
| path: dist/ | ||
| retention-days: 7 | ||