Verify Camsense X1 packet checksum #3
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 | |
| # Publishes to PyPI automatically when a version tag (e.g. v0.5.1) is pushed, | |
| # using PyPI Trusted Publishing (OIDC) — no API token stored in GitHub. | |
| # | |
| # One-time setup on PyPI (https://pypi.org/manage/project/lds2d/settings/publishing/): | |
| # Owner: kaiaai Repository: lds2d Workflow: publish.yml Environment: pypi | |
| # | |
| # Release flow: bump version in pyproject.toml + src/lds2d/__init__.py, commit, | |
| # then: git tag vX.Y.Z && git push origin vX.Y.Z | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build: | |
| name: Build & test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install package + build/test tooling | |
| run: | | |
| python -m pip install --upgrade pip build twine | |
| python -m pip install -e ".[viz,dev]" | |
| - name: Run tests | |
| run: python -m pytest -q | |
| - name: Build sdist + wheel | |
| run: python -m build | |
| - name: Check distribution metadata | |
| run: python -m twine check dist/* | |
| - name: Upload built distributions | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| publish: | |
| name: Publish to PyPI | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/lds2d/ | |
| permissions: | |
| id-token: write # required for Trusted Publishing (OIDC) | |
| steps: | |
| - name: Download built distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |