diff --git a/.github/workflows/publish-python.yaml b/.github/workflows/publish-python.yaml index d303ace66..0797391d9 100644 --- a/.github/workflows/publish-python.yaml +++ b/.github/workflows/publish-python.yaml @@ -4,7 +4,7 @@ on: [workflow_dispatch] jobs: build-linux-x86_64: - name: "Build manylinux_2_31 x86_64 wheel" + name: "Build manylinux 2014 x86_64 wheel" runs-on: ubuntu-20.04 strategy: matrix: @@ -12,6 +12,8 @@ jobs: defaults: run: working-directory: bindings/nostr-ffi/bindings-python + container: + image: quay.io/pypa/manylinux2014_x86_64 steps: - name: "Checkout" uses: actions/checkout@v3 @@ -29,11 +31,11 @@ jobs: run: bash ./scripts/generate-linux-x86_64.sh - name: "Build wheel" - run: python3 setup.py bdist_wheel --plat-name manylinux_2_31_x86_64 --verbose + run: python3 setup.py bdist_wheel --plat-name manylinux2014_x86_64 --verbose - uses: actions/upload-artifact@v3 with: - name: nostr_sdk-manylinux_2_31_x86_64-${{ matrix.python }} + name: nostr_sdk-manylinux2014_x86_64-${{ matrix.python }} path: /home/runner/work/nostr/nostr/bindings/nostr-ffi/bindings-python/dist/*.whl build-linux-aarch64: diff --git a/.github/workflows/publish-sdk-python.yaml b/.github/workflows/publish-sdk-python.yaml index 62b5b297c..02cbe7acf 100644 --- a/.github/workflows/publish-sdk-python.yaml +++ b/.github/workflows/publish-sdk-python.yaml @@ -4,14 +4,23 @@ on: [workflow_dispatch] jobs: build-linux-x86_64: - name: "Build manylinux_2_31 x86_64 wheel" + name: "Build manylinux_2_28_x86_64 wheel" runs-on: ubuntu-20.04 strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] + python: + - cp39-cp39 + - cp310-cp310 + - cp311-cp311 + - cp312-cp312 defaults: run: working-directory: bindings/nostr-sdk-ffi/bindings-python + container: + image: quay.io/pypa/manylinux_2_28_x86_64 + env: + PLAT: manylinux_2_28_x86_64 + PYBIN: "/opt/python/${{ matrix.python }}/bin" steps: - name: "Checkout" uses: actions/checkout@v3 @@ -20,20 +29,15 @@ jobs: with: toolchain: stable - - name: "Setup Python" - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: "Generate nostr_sdk.py and binaries" run: bash ./scripts/generate-linux-x86_64.sh - name: "Build wheel" - run: python3 setup.py bdist_wheel --plat-name manylinux_2_31_x86_64 --verbose + run: ${PYBIN}/python setup.py bdist_wheel --plat-name manylinux_2_28_x86_64 --verbose - uses: actions/upload-artifact@v3 with: - name: nostr_sdk-manylinux_2_31_x86_64-${{ matrix.python }} + name: nostr_sdk-manylinux_2_28_x86_64-${{ matrix.python }} path: /home/runner/work/nostr/nostr/bindings/nostr-sdk-ffi/bindings-python/dist/*.whl build-linux-aarch64: @@ -187,9 +191,9 @@ jobs: with: path: dist/ - - name: "Publish on PyPI" - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} - packages-dir: dist/*/ +# - name: "Publish on PyPI" +# uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# user: __token__ +# password: ${{ secrets.PYPI_API_TOKEN }} +# packages-dir: dist/*/ diff --git a/bindings/nostr-sdk-ffi/bindings-python/scripts/generate-linux-x86_64.sh b/bindings/nostr-sdk-ffi/bindings-python/scripts/generate-linux-x86_64.sh index f152771fa..23e6e083b 100644 --- a/bindings/nostr-sdk-ffi/bindings-python/scripts/generate-linux-x86_64.sh +++ b/bindings/nostr-sdk-ffi/bindings-python/scripts/generate-linux-x86_64.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -python --version -pip install -r requirements.txt +${PYBIN}/python --version +${PYBIN}/pip install -r requirements.txt echo "Generating native binaries..." cargo build --release