Skip to content

Commit

Permalink
Build package
Browse files Browse the repository at this point in the history
  • Loading branch information
bart0003 committed Dec 14, 2023
1 parent bda3150 commit 5599da8
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/python-publish-to-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: Upload Python Package
on:
release:
types: [created]
pull_request: {}

jobs:
deploy:
Expand All @@ -25,18 +26,26 @@ jobs:
- 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 }}
- name: Build for PyPi
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
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/tags/')
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'pull_request' }}
with:
path: dist/*.whl
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
Expand Down

0 comments on commit 5599da8

Please sign in to comment.