diff --git a/.github/action-common-python-release/action.yml b/.github/action-common-python-release/action.yml index 1bc782b5..2eadd91b 100644 --- a/.github/action-common-python-release/action.yml +++ b/.github/action-common-python-release/action.yml @@ -43,13 +43,24 @@ runs: pip install toml python crates/python/scripts/patch_grpc_web.py cargo update - - name: Maturin build + + # must be build or sdist + - if: inputs.maturin-command == 'build' + name: Maturin - Build uses: messense/maturin-action@v1 with: command: ${{ inputs.maturin-command }} target: ${{ inputs.maturin-target }} - args: ${{ inputs.maturin-args }} --manifest-path crates/python/Cargo.toml --out dist ${{ inputs.package-name == 'qcs-sdk-python-grpc-web' && '-F grpc-web' || '' }} + args: -i 3.8 3.9 3.10 3.11 3.12 --release --manifest-path crates/python/Cargo.toml --out dist ${{ inputs.package-name == 'qcs-sdk-python-grpc-web' && '-F grpc-web' || '' }} docker-options: -e CI + - if: inputs.maturin-command == 'sdist' + name: Maturin - Source Distribution + uses: messense/maturin-action@v1 + with: + command: ${{ inputs.maturin-command }} + target: ${{ inputs.maturin-target }} + args: --manifest-path crates/python/Cargo.toml --out dist + - name: Install wheel shell: bash run: | diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index fc4727c1..a268edf1 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -44,7 +44,6 @@ jobs: with: package-name: ${{ matrix.package-name }} maturin-target: universal2-apple-darwin - maturin-args: -i 3.8 3.9 3.10 3.11 3.12 --release linux: runs-on: ubuntu-latest @@ -65,7 +64,6 @@ jobs: - uses: ./.github/action-common-python-release with: package-name: ${{ matrix.package-name }} - maturin-args: -i 3.8 3.9 3.10 3.11 3.12 --release windows: runs-on: windows-latest @@ -85,7 +83,6 @@ jobs: package-name: ${{ matrix.package-name }} python-architectire: x64 rust-target: x86_64-pc-windows-msvc - maturin-args: -i 3.8 3.9 3.10 3.11 3.12 --release sdist: runs-on: ubuntu-latest