v2.3.0rc13 #122
Workflow file for this run
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
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
name: Upload Python Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8.x' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Poetry plugins | |
run: | | |
poetry self add "poetry-dynamic-versioning[plugin]" | |
- name: Build and publish | |
env: | |
PYPI_USERNAME: __token__ | |
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
poetry build --format wheel | |
poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD | |
- name: Build for Sber | |
run: | | |
sed -i "s/smart-app-framework/sber-nlp-platform-smart-app-framework/g" pyproject.toml | |
poetry build --format wheel | |
- name: Upload Assets | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
dist/*.whl |