Build SDK #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build SDK | |
# Controls when the workflows will run | |
on: | |
# Allows you to run this workflows manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
branch_path: | |
description: 'branch' | |
required: true | |
default: '开发分支' | |
setup_path: | |
description: 'setup.py所在目录' | |
required: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
git clone -b ${{ github.event.inputs.branch_path }} 'https://github.com/QPT-Family/QPT-SDK' | |
cd 'QPT-SDK/'${{ github.event.inputs.setup_path }} | |
python -m pip install --upgrade pip | |
pip install setuptools twine wheel | |
python setup.py sdist bdist_wheel | |
- name: Publish package | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
ls -l | |
cd 'QPT-SDK/'${{ github.event.inputs.setup_path }} | |
ls -l | |
twine upload dist/* | |
- name: 上传文件 | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Whl | |
path: QPT-SDK/${{ github.event.inputs.setup_path }}/dist/* |