mirror of
https://github.com/neonbjb/tortoise-tts.git
synced 2026-01-29 20:04:20 +01:00
add build wheel
This commit is contained in:
parent
9b1671e4f8
commit
09ffec66fa
65
.github/workflows/build_wheel.yml
vendored
Normal file
65
.github/workflows/build_wheel.yml
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
name: Build wheel
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
create:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions: write-all
|
||||
strategy:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
platform: [ubuntu-latest]
|
||||
python-version: ["3.10"]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install Deps
|
||||
run: python -m pip install . torch==2.3.1 wheel ninja
|
||||
- name: Build the wheel
|
||||
run: python setup.py bdist_wheel -d dist/
|
||||
- run: du -h dist/*
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: dist/*.whl
|
||||
|
||||
- name: Log Built Wheels
|
||||
run: |
|
||||
ls dist
|
||||
|
||||
- name: Set wheel name
|
||||
run: echo "wheel_name=$(basename dist/*.whl)" >> $GITHUB_ENV
|
||||
|
||||
- name: Get the tag version
|
||||
id: extract_branch
|
||||
run: echo ::set-output name=branch::${GITHUB_REF#refs/tags/}
|
||||
|
||||
- name: Get Release with tag
|
||||
id: get_current_release
|
||||
uses: joutvhu/get-release@v1
|
||||
with:
|
||||
tag_name: ${{ steps.extract_branch.outputs.branch }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload_release_asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.get_current_release.outputs.upload_url }}
|
||||
asset_path: ./dist/${{env.wheel_name}}
|
||||
asset_name: ${{env.wheel_name}}
|
||||
asset_content_type: application/*
|
||||
Loading…
Reference in a new issue