Upload LTP Python Package #2
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: Upload LTP Python Package | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
interface: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [x86_64] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
architecture: x64 | |
- name: Build Wheels | |
run: | | |
pip wheel --no-deps -w dist python/interface | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [interface] | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: wheels | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Publish LTP to PyPi | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install --upgrade twine | |
twine upload --skip-existing ltp-* |