Skip to content

Commit d3a5402

Browse files
authored
uploading packageg to pypy
1 parent b756303 commit d3a5402

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/package.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,25 @@ jobs:
1515
build_type: [Release]
1616
c_compiler: [clang]
1717
python-version: ['3.11']
18-
# python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
1918
steps:
2019
- uses: actions/checkout@v4
21-
20+
2221
- uses: actions/setup-python@v5
2322

2423
- name: Install cibuildwheel
2524
run: python -m pip install cibuildwheel==2.21.3
26-
27-
- name: MacOS dpendencies
25+
26+
- name: Install Twine
27+
run: python -m pip install twine # Install Twine for uploading the package
28+
29+
- name: MacOS dependencies
2830
if: ${{ runner.os == 'macOS' }}
2931
run: |
3032
brew uninstall pkg-config || echo "pkg-config not installed, skipping uninstallation."
3133
brew uninstall pkg-config@0.29.2 || echo "pkg-config@0.29.2 not available, skipping uninstallation."
3234
brew install gsl
3335
brew install hdf5
36+
3437
- name: Windows dependencies
3538
if: ${{ runner.os == 'Windows' }}
3639
uses: mamba-org/setup-micromamba@v1
@@ -74,10 +77,11 @@ jobs:
7477
CIBW_BUILD: '*-manylinux_x86_64'
7578
CIBW_SKIP: 'pp*'
7679
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
77-
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux_2_28
80+
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux_2_28
7881
run: |
7982
python -m cibuildwheel --output-dir wheelhouse
8083
ls wheelhouse
84+
8185
- name: MacOS package
8286
if: runner.os == 'macOS'
8387
env:
@@ -98,6 +102,7 @@ jobs:
98102
export "MACOSX_DEPLOYMENT_TARGET=$(echo ${{ matrix.os }} | cut -c 7-8).0" # required because gsl2.8 has minimum target of 14.0
99103
python -m cibuildwheel --output-dir wheelhouse
100104
ls wheelhouse
105+
101106
- name: Windows package
102107
if: runner.os == 'Windows'
103108
env:
@@ -109,9 +114,10 @@ jobs:
109114
micromamba activate moose
110115
python -m cibuildwheel --output-dir wheelhouse
111116
dir wheelhouse
112-
- name: Upload packages
113-
uses: xresloader/upload-to-github-release@v1
117+
118+
- name: Upload to PyPI
114119
env:
115-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116-
with:
117-
file: "wheelhouse/pymoose*.whl"
120+
TWINE_USERNAME: __token__ # Use __token__ as the username
121+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Use the secret with your PyPI token as the password
122+
run: |
123+
twine upload wheelhouse/*.whl # Upload the built wheels to PyPI

0 commit comments

Comments
 (0)