-
Notifications
You must be signed in to change notification settings - Fork 69
53 lines (47 loc) · 1.51 KB
/
wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build Wheels
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel
- name: Build Graph
run: |
python -m tn --text "2.5平方电线" --overwrite_cache --language "zh"
python -m tn --text "2010-03-21" --overwrite_cache --language "en"
python -m itn --text "二点五平方电线" --overwrite_cache
- name: Prepare Graph
run: |
mkdir graph
cp tn/*.fst graph
cp itn/*.fst graph
- name: Upload Graph
uses: actions/upload-artifact@v3
with:
name: release-graph-v${{ github.event.inputs.version}}
path: graph
- name: Publish on pypi.org
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel --version=${{ github.event.inputs.version}}
python -m pip install -U twine
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*