-
Notifications
You must be signed in to change notification settings - Fork 99
33 lines (30 loc) · 1.08 KB
/
pypi-publish-dev.yml
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
# This workflow will upload a dev Python Package to PyPI using Twine when a main branch commit
# is pushed. For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: pypi-dev
# PyPI push triggers whenever we push a commit to main.
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
# NOTE: grpcio-tools needs to be periodically updated to support later Python versions.
run: |
sudo apt-get install -y libprotobuf-dev
python -m pip install --upgrade pip
pip install setuptools wheel twine==5.0.0 grpcio-tools>=1.70.0
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py --dev sdist bdist_wheel
twine upload dist/*