[PACKAGING] Updates README following v1.3.0 #70
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: release_pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ["**/*.py", "**/*.c", "**/*.h", "**/*.toml", "**/languages.json", "MANIFEST.in"] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| paths: ["**/*.py", "**/*.c", "**/*.h", "**/*.toml", "**/languages.json", "MANIFEST.in"] | |
| types: ["opened", "reopened", "synchronize"] | |
| jobs: | |
| style: | |
| name: (black) Check formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: psf/black@stable | |
| with: | |
| options: "--check --verbose" | |
| src: "./locstat" | |
| version: "26.1.0" | |
| flake: | |
| runs-on: ubuntu-latest | |
| name: (autoflake) Check unused imports | |
| needs: style | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: creyD/autoflake_action@v1.1 | |
| with: | |
| checkpath: ./locstat | |
| options: --check --remove-all-unused-imports --ignore-init-module-imports -r -v | |
| no-commit: true | |
| test: | |
| name: (pytest) Run tests | |
| runs-on: ubuntu-latest | |
| needs: flake | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build Python | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install build pytest | |
| pip install -e . --force-reinstall | |
| - run: pytest -s | |
| build-wheels: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| name: (cibuildwheels) Build wheels for ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, windows-11-arm, macos-14] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Run cibuildwheels | |
| uses: pypa/cibuildwheel@v3.3.1 | |
| with: | |
| output-dir: ${{ runner.temp }}/wheelhouse | |
| - name: Persist files for publish jobs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: ${{ runner.temp }}/wheelhouse | |
| build-sdist: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| name: (pipx) Build source distribution | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build sdist | |
| run: pipx run build --sdist -o ${{ runner.temp }}/wheelhouse | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: ${{ runner.temp }}/wheelhouse | |
| publish: | |
| name: (pypa gh actions) Publish release to Pypi | |
| runs-on: ubuntu-latest | |
| needs: [build-wheels, build-sdist] | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Upload to Pypi | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| verbose: true |