Skip to content

ci: fix packages-dir #8

ci: fix packages-dir

ci: fix packages-dir #8

Workflow file for this run

name: Build and Publish Python Package
on:
push:
branches:
- main
- feat_add_python_client
env:
PYPI_REPOSITORY_URL: https://test.pypi.org/legacy/
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for git hash
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install buf
uses: bufbuild/buf-setup-action@v1.5.0
with:
version: "1.47.2"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Build Python package
run: proton-build --hash ${{ github.sha }}
- name: Build wheel
run: proton-publish
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: ${{ env.PYPI_REPOSITORY_URL }}
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
packages-dir: python/dist/dist/