v0.5.0 — Context Graph + Living Context Engine #1
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: Publish to PyPI | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| build-and-publish: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine pybind11 numpy | |
| - name: Build C++ core | |
| run: | | |
| g++ -O3 -std=c++17 -fPIC -c src/feather_core.cpp -o feather_core.o | |
| ar rcs libfeather.a feather_core.o | |
| - name: Build wheel | |
| run: | | |
| python -m build --wheel | |
| - name: Check distribution | |
| run: | | |
| twine check dist/* | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: wheels-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: dist/*.whl | |
| publish: | |
| needs: build-and-publish | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v3 | |
| with: | |
| path: dist/ | |
| - name: Flatten artifacts | |
| run: | | |
| mkdir -p final-dist | |
| find dist -name "*.whl" -exec cp {} final-dist/ \; | |
| ls -la final-dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| packages-dir: final-dist/ |