aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkruall <kruall@ydb.tech>2024-10-17 12:52:49 +0300
committerGitHub <noreply@github.com>2024-10-17 12:52:49 +0300
commit7df54e238a86a3f327e71c4e58b96e6b411475ce (patch)
tree0582b61c2b1f59bf04fb865b8beb0a5613bd0010
parentd0cfbf306137a4f30fbcfe98f9e270b060c57905 (diff)
downloadydb-7df54e238a86a3f327e71c4e58b96e6b411475ce.tar.gz
Add workflow for publishing dstool (#9787)
-rw-r--r--.github/workflows/update_dstool_package.yaml46
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/update_dstool_package.yaml b/.github/workflows/update_dstool_package.yaml
new file mode 100644
index 0000000000..0f56eb4de7
--- /dev/null
+++ b/.github/workflows/update_dstool_package.yaml
@@ -0,0 +1,46 @@
+name: Update dstool package
+
+on:
+ workflow_dispatch:
+ inputs:
+ commit_sha:
+ type: string
+ default: ""
+
+jobs:
+ update-dstool:
+ name: Update dstool package
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.6'
+
+ - name: Install dependencies
+ run: |
+ set -ex
+ python -m pip install --upgrade pip
+ pip install build twine
+
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.commit_sha }}
+
+ - name: Compile proto files and build package
+ run: |
+ set -ex
+ cd ${{ github.workspace }}/ydb
+ ./ydb/apps/dstool/compile_protos.py --ydb-root ./
+ mv ydb/apps/dstool/setup.py .
+ python -m build
+
+ - name: Upload package to PyPI
+ env:
+ TWINE_USERNAME: __token__
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
+ run: |
+ set -ex
+ cd ${{ github.workspace }}/ydb
+ python -m twine upload dist/*