diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e69de29..3696966 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -0,0 +1,30 @@ +name: Release to PyPI + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/cdp-sdk + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}