From 1d080a6edb6398e91ce90ec87da907db5d5f323a Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 29 Nov 2022 12:08:40 -0500 Subject: [PATCH] Split pip and github release --- .github/workflows/pip-release.yml | 45 +++++++++++++++++++++++++++++++ .github/workflows/release.yml | 24 +---------------- 2 files changed, 46 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/pip-release.yml diff --git a/.github/workflows/pip-release.yml b/.github/workflows/pip-release.yml new file mode 100644 index 00000000..cc6f0eb1 --- /dev/null +++ b/.github/workflows/pip-release.yml @@ -0,0 +1,45 @@ +name: Release + +permissions: + contents: write + +on: + release: + types: + - "published" + +jobs: + release: + name: "Release" + + strategy: + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + fail-fast: false + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v3 + - uses: r7kamura/rust-problem-matchers@v1.1.0 + + # Publish Dora Node Python API + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install maturin==0.13.2 + - name: Publish wheel + shell: bash + env: + MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }} + run: | + cd apis/python/node + maturin publish \ + --skip-existing \ + -o wheels \ + -i python \ + --username __token__ \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de214425..c690b1d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7"] fail-fast: false runs-on: ${{ matrix.platform }} @@ -80,25 +80,3 @@ jobs: asset_path: archive.zip asset_name: dora-${{ github.ref_name }}-x86_64-${{ runner.os }}.zip asset_content_type: application/zip - - # Publish Dora Node Python API - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install maturin==0.13.2 - - name: Publish wheel - shell: bash - env: - MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }} - run: | - cd apis/python/node - maturin publish \ - --no-sdist \ - --skip-existing \ - -o wheels \ - -i python \ - --username __token__ \