Merge pull request #150 from zeek/dependabot/pip/tree-sitter-zeek-0.2.14 #353
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 Python wheels | |
| # For reference, see https://cibuildwheel.readthedocs.io/en/1.x/setup/ | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| tags: | |
| - 'v*' | |
| - '!v*-dev' | |
| jobs: | |
| build_sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Build SDist | |
| run: python ./setup.py sdist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| path: dist/*.tar.gz | |
| check: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install .[dev] | |
| - run: pytest | |
| upload_all: | |
| needs: [build_sdist, check] | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| # The above jobs yield a combined artifacts archive | |
| name: artifact | |
| path: dist | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.pypi_password }} |