This repository was archived by the owner on Aug 31, 2025. It is now read-only.
Bump version to 2.0.3 #107
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 and publish wheels | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest ] | |
| #os: [ ubuntu-latest ] | |
| python-version: [ "3.10", "3.11", "3.12", "3.13" ] | |
| #python-version: [ "3.12" ] | |
| architecture: [ x86_64, arm64 ] | |
| #architecture: [ arm64 ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install maturin | |
| - name: Add rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.os == 'ubuntu-latest' && 'x86_64-unknown-linux-gnu' || matrix.architecture == 'x86_64' && 'x86_64-apple-darwin' || 'aarch64-apple-darwin' }} | |
| - name: Build wheel | |
| run: maturin build --release --target ${{ matrix.os == 'ubuntu-latest' && 'x86_64-unknown-linux-gnu' || matrix.architecture == 'x86_64' && 'x86_64-apple-darwin' || 'aarch64-apple-darwin' }} | |
| - name: Upload wheel | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.architecture }} | |
| # name: wheel | |
| path: ./target/wheels/*.whl | |
| pypi-publish: | |
| name: Upload release to PyPI | |
| #if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/vimania-uri-rs | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
| steps: | |
| # retrieve your distributions here | |
| - name: Download wheel artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| # pattern: * | |
| path: ./target/wheels | |
| merge-multiple: true | |
| - name: Display structure of downloaded files | |
| run: ls -R ./target/wheels | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: ./target/wheels | |
| verbose: true | |
| skip-existing: true | |
| # publish: | |
| # needs: build | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Download wheel artifacts | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # # pattern: * | |
| # path: ./target/wheels | |
| # merge-multiple: true | |
| # | |
| # - name: Display structure of downloaded files | |
| # run: ls -R ./target/wheels | |
| # | |
| # - name: Install dependencies | |
| # run: pip install twine | |
| # | |
| # - name: Upload to PyPI | |
| # run: twine upload --skip-existing ./target/wheels/*.whl | |
| # env: | |
| # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
| # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |