From 174e1a1f5d82c0a6f5dd626c294f52648a802a8e Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 6 Sep 2021 16:48:32 +0200 Subject: [PATCH] Add workflow for publishing wheels --- .github/workflows/publish.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ed95774 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,57 @@ +name: Publish + +on: + push: + tags: + - py-* + +jobs: + Unix: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + python: [3.7, 3.8, 3.9] + + runs-on: ${{ matrix.os }} + environment: "Publish wheels" + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + architecture: x64 + - name: Publish + uses: messense/maturin-action@v1 + with: + command: publish + args: -m instant-distance-py/Cargo.toml + --no-sdist + --username __token__ + --password ${{ secrets.PYPI_TOKEN }} + --interpreter python${{ matrix.python }} + + Windows: + runs-on: windows-latest + environment: "Publish wheels" + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Publish all versions + uses: messense/maturin-action@v1 + with: + command: publish + args: -m instant-distance-py/Cargo.toml + --no-sdist + --username __token__ + --password ${{ secrets.PYPI_TOKEN }}