Skip to content

Commit

Permalink
chore: try to fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
XieJiSS committed Jul 4, 2024
1 parent 77108ce commit 686e2e1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
python-version: ['3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -55,7 +55,14 @@ jobs:
- name: Build package and upload (macOS)
if: runner.os == 'macOS'
run: bash release-pypi-macos.sh testonly && bash release-pypi-macos-arm.sh testonly
run: bash release-pypi-macos.sh testonly
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

- name: Build package and upload (macOS arm64)
if: runner.os == 'macOS'
run: bash release-pypi-macos-arm.sh testonly
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
release-pypi:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -22,8 +22,15 @@ jobs:
ubuntu:22.04 /bin/bash /opt/OpenCC/release-pypi-linux.sh
- name: Build package and upload (macOS)
if: runner.os == 'macOS'
run: bash release-pypi-macos.sh && bash release-pypi-macos-arm.sh
if: runner.os == 'macOS' && runner.arch == 'x64'
run: bash release-pypi-macos.sh
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

- name: Build package and upload (macOS arm64)
if: runner.os == 'macOS' && runner.arch == 'arm64'
run: bash release-pypi-macos-arm.sh
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def _determine_platform_tag():
if sys.platform == 'darwin':
_, _, _, _, machine = os.uname()
if machine == 'x86_64':
return 'macosx-10.9-{}'.format(machine)
return 'macosx-13-{}'.format(machine)
if machine == 'arm64':
return 'macosx-11.0-{}'.format(machine)
return 'macosx-14-{}'.format(machine)
else:
raise NotImplementedError

Expand Down

0 comments on commit 686e2e1

Please sign in to comment.