aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/update_dstool_package.yaml
blob: fb6b5bfb430c6be1bbdfd2806e62b5a316bb2293 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Update dstool package

on:
  workflow_dispatch:
    inputs:
      commit_sha:
        type: string
        default: ""

jobs:
  update-dstool:
    name: Update dstool package
    runs-on: ubuntu-latest

    permissions:
      id-token: write

    steps:
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.7.13'

      - name: Install dependencies
        run: |
          set -ex
          python -m pip install --upgrade pip
          pip install build twine grpcio-tools setuptools

      - name: Checkout
        uses: actions/checkout@v4
        with:
          ref: ${{ inputs.commit_sha }}

      - name: Compile proto files and build package
        run: |
          set -ex
          ${{ github.workspace }}/ydb/apps/dstool/compile_protos.py --ydb-root ${{ github.workspace }}
          mv ${{ github.workspace }}/ydb/apps/dstool/setup.py ${{ github.workspace }}
          python -m build

      - name: Upload package to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1.8