feat: add document and remove user_id #9
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: CI/CD | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| tags: | |
| - "v*" | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| publish_to_pypi: | |
| description: Publish to PyPI | |
| required: true | |
| type: boolean | |
| default: false | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.8" | |
| - name: Build Wheels | |
| uses: PyO3/maturin-action@v1 | |
| env: | |
| PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1" | |
| with: | |
| command: build | |
| args: > | |
| --release | |
| --out dist | |
| --find-interpreter | |
| manylinux: auto | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: dist | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist | |
| publish: | |
| if: ${{ inputs.publish_to_pypi }} | |
| needs: | |
| - build | |
| - sdist | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist | |
| - uses: pypa/gh-action-pypi-publish@release/v1 |