Skip to content

Commit 6b40809

Browse files
committed
Fix GHA to publish in pypi
1 parent 359a6cc commit 6b40809

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ jobs:
2929
- name: Install dependencies
3030
run: |
3131
python -m pip install --upgrade pip
32-
pip install build
32+
pip install twine
3333
- name: Build package
34-
run: python -m build
34+
run: |
35+
python setup.py bdist_wheel --plat-name manylinux_2_17_x86_64
36+
python setup.py bdist_wheel --plat-name manylinux_2_17_aarch64
37+
python setup.py bdist_wheel --plat-name win_amd64
38+
python setup.py bdist_wheel --plat-name macosx_14_0_arm64
39+
python setup.py bdist_wheel --plat-name macosx_10_15_x86_64
40+
python setup.py sdist
3541
- name: Publish package
36-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37-
with:
38-
user: __token__
39-
password: ${{ secrets.PYPI_API_TOKEN }}
42+
run: |
43+
python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
44+

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ def get_package_data():
3333
else:
3434
raise RuntimeError('Unsupported platform: ' + plat_name)
3535

36+
arch = "x86_64/"
37+
if "arm64" in plat_name or "aarch64" in plat_name:
38+
arch = "arm64/"
39+
40+
lib = arch + lib
41+
3642
return ['native/' + lib]
3743

3844
# if it is not present, return ['native/*']
@@ -45,7 +51,7 @@ def get_package_data():
4551
setup(
4652
name='bink',
4753
packages=find_packages(exclude=['tests']),
48-
version='0.1.0',
54+
version='0.2.0',
4955
description='Runtime for Ink, a scripting language for writing interactive narrative',
5056
long_description_content_type='text/x-rst',
5157
long_description=description,

0 commit comments

Comments
 (0)