From 59d28b8a111cb13f3b30d5eaf34a7b8f8adec37d Mon Sep 17 00:00:00 2001 From: Linlang Date: Thu, 19 Dec 2024 21:21:15 +0800 Subject: [PATCH] rewrite deploy with macos --- .github/workflows/python-publish.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index eac3552bdc..75b7d01c6a 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -150,24 +150,20 @@ jobs: print(f'Renamed: {whl_file} -> {new_whl_file}') " - name: Build 2 - if: ${{ (matrix.buildplat[0] != 'macos-13' || matrix['python-version'] != '3.11') && (matrix.buildplat[0] != 'macos-13' || matrix['python-version'] != '3.12') }} run: | make build - name: Rename 2 - if: ${{ (matrix.buildplat[0] != 'macos-13' || matrix['python-version'] != '3.11') && (matrix.buildplat[0] != 'macos-13' || matrix['python-version'] != '3.12') }} run: | python -c " from pathlib import Path plat_info = '${{ matrix.buildplat[1] }}'.split('_', 1)[-1] for whl_file in Path('./dist').glob('*.whl'): - if 'universal2' in whl_file.stem: - new_name = whl_file.name.replace('universal2', plat_info) - new_whl_file = whl_file.with_name(new_name) - whl_file.rename(new_whl_file) - print(f'Renamed: {whl_file} -> {new_whl_file}') + new_name = whl_file.name.replace('universal2', plat_info) + new_whl_file = whl_file.with_name(new_name) + whl_file.rename(new_whl_file) + print(f'Renamed: {whl_file} -> {new_whl_file}') " - name: Build 3 - if: ${{ (matrix.buildplat[0] != 'macos-13' || matrix['python-version'] != '3.11') && (matrix.buildplat[0] != 'macos-13' || matrix['python-version'] != '3.12') }} run: | make build - name: Build and publish