From 0dcfce65c4bb1c11af7d690fec79176a02f6201a Mon Sep 17 00:00:00 2001 From: nkaz001 Date: Mon, 5 Aug 2024 12:14:47 -0400 Subject: [PATCH] chore: fix CI. --- .github/workflows/release-python.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index e0a71c4c..a5c0f3f2 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -16,6 +16,9 @@ on: type: boolean default: false +env: + PYTHON_VERSION: '3.10' + permissions: contents: read @@ -33,9 +36,11 @@ jobs: target: armv7 steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: ${{ env.PYTHON_VERSION }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -62,9 +67,11 @@ jobs: target: armv7 steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: ${{ env.PYTHON_VERSION }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -87,9 +94,11 @@ jobs: target: x64 steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: ${{ env.PYTHON_VERSION }} architecture: ${{ matrix.platform.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -114,9 +123,11 @@ jobs: target: aarch64 steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - uses: actions/setup-python@v5 with: - python-version: 3.10 + python-version: ${{ env.PYTHON_VERSION }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -133,6 +144,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - name: Build sdist uses: PyO3/maturin-action@v1 with: @@ -152,6 +165,7 @@ jobs: steps: - uses: actions/download-artifact@v4 - name: Publish to PyPI + if: inputs.dry-run == false uses: PyO3/maturin-action@v1 env: MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}