mirror of
https://github.com/neonbjb/tortoise-tts.git
synced 2026-04-21 06:14:04 +00:00
65 lines
No EOL
1.7 KiB
YAML
65 lines
No EOL
1.7 KiB
YAML
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/* |