fix(build): configure setuptools package discovery in pyproject.toml #5
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: Tag Release Build | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build Multi-Platform Artifacts (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel build pyinstaller | |
| - name: Build Python Package (Wheel & sdist) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| python -m build | |
| - name: Build Windows Executables | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| pyinstaller --onefile owlbearag/cli.py --name owlbearag.exe | |
| pyinstaller --onefile llama_node/gui_client.py --name owlbearag_gui.exe | |
| - name: Build Linux Executable | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| pyinstaller --onefile llama_node/gui_client.py --name owlbearag_gui | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os }}-artifacts | |
| path: | | |
| dist/*.whl | |
| dist/*.tar.gz | |
| dist/owlbearag.exe | |
| dist/owlbearag_gui | |
| dist/owlbearag_gui.exe | |
| publish-release: | |
| name: Publish GitHub Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| files: ./artifacts/** | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |