Refactor build workflow to remove unnecessary comments and clarify in… #8
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies (runtime only) | |
| run: uv sync --no-dev | |
| - name: Install build tools | |
| run: uv pip install "nuitka[onefile]" | |
| # Linux/macOS | |
| - name: Build Unix | |
| if: runner.os != 'Windows' | |
| run: | | |
| uv run python -m nuitka \ | |
| --standalone \ | |
| --onefile \ | |
| --assume-yes-for-downloads \ | |
| --output-filename=crow-client \ | |
| src/client | |
| - name: Build Windows | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| env: | |
| NUITKA_ASSUME_YES_FOR_DOWNLOADS: "1" | |
| run: | | |
| uv run python -m nuitka ` | |
| --standalone ` | |
| --onefile ` | |
| --assume-yes-for-downloads ` | |
| --output-filename=crow-client ` | |
| src/client | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crow-client-${{ runner.os }} | |
| path: | | |
| *.exe | |
| *.bin | |
| crow-client* |