update_dstool_package.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: Update dstool package
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. commit_sha:
  6. type: string
  7. default: ""
  8. jobs:
  9. update-dstool:
  10. name: Update dstool package
  11. runs-on: ubuntu-latest
  12. permissions:
  13. id-token: write
  14. steps:
  15. - name: Set up Python
  16. uses: actions/setup-python@v4
  17. with:
  18. python-version: '3.8.12'
  19. - name: Install dependencies
  20. run: |
  21. set -ex
  22. python -m pip install --upgrade pip
  23. pip install build twine grpcio-tools setuptools
  24. - name: Checkout
  25. uses: actions/checkout@v4
  26. with:
  27. ref: ${{ inputs.commit_sha }}
  28. - name: Compile proto files and build package
  29. run: |
  30. set -ex
  31. ${{ github.workspace }}/ydb/apps/dstool/compile_protos.py --ydb-root ${{ github.workspace }}
  32. mv ${{ github.workspace }}/ydb/apps/dstool/setup.py ${{ github.workspace }}
  33. python -m build
  34. - name: Upload package to PyPI
  35. uses: pypa/gh-action-pypi-publish@release/v1.8