Skip to content

Commit

Permalink
ci(build): Fix build wheels error
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyinc committed Nov 4, 2024
1 parent 436382c commit 63d1fec
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 8 deletions.
72 changes: 65 additions & 7 deletions .github/workflows/release-python-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,43 @@ jobs:
run: |
python -m pip install --find-links=dist lyric-js-worker
# publish:
# needs: [test-packages]
# runs-on: ubuntu-latest
# if: github.event_name == 'release' && github.event.action == 'published'
# environment:
# name: pypi
# url: https://pypi.org/p/lyric-js-worker
# permissions:
# id-token: write
#
# steps:
# - name: Download all wheels
# uses: actions/download-artifact@v4
# with:
# pattern: dist-wheels-py*
# merge-multiple: true
# path: dist-wheels
#
# - name: Download sdist
# uses: actions/download-artifact@v4
# with:
# name: dist-sdist
# path: dist-sdist
#
# - name: Prepare dist directory
# run: |
# mkdir dist
# cp dist-wheels/* dist/
# cp dist-sdist/* dist/
#
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages-dir: dist
# verbose: true
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
publish:
needs: [test-packages]
runs-on: ubuntu-latest
Expand All @@ -217,6 +254,12 @@ jobs:
id-token: write

steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'

- name: Download all wheels
uses: actions/download-artifact@v4
with:
Expand All @@ -236,10 +279,25 @@ jobs:
cp dist-wheels/* dist/
cp dist-sdist/* dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Install twine
run: |
python -m pip install --upgrade pip
python -m pip install twine
- name: Verify distributions
run: |
echo "Checking wheel contents:"
unzip -l dist/*.whl | grep wasm || true
echo "Running twine check:"
twine check dist/*
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
run: |
python -m twine upload \
--verbose \
--disable-progress-bar \
dist/*
2 changes: 1 addition & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "python"
version = "0.1.2-rc1"
version = "0.1.2-rc2"
description = "Add your description here"
authors = [
{ name = "Fangyin Cheng", email = "[email protected]" }
Expand Down

0 comments on commit 63d1fec

Please sign in to comment.