| 1 |
on: |
| 2 |
push: |
| 3 |
tags: |
| 4 |
- 'release/python/v*' |
| 5 |
|
| 6 |
permissions: {} |
| 7 |
|
| 8 |
name: release Python package |
| 9 |
|
| 10 |
jobs: |
| 11 |
pypi: |
| 12 |
name: upload release to PyPI |
| 13 |
runs-on: ubuntu-latest |
| 14 |
permissions: |
| 15 |
contents: read |
| 16 |
id-token: write # required for trusted publishing to PyPI |
| 17 |
|
| 18 |
steps: |
| 19 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 20 |
with: |
| 21 |
persist-credentials: false |
| 22 |
|
| 23 |
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 24 |
with: |
| 25 |
python-version: "3.x" |
| 26 |
|
| 27 |
- name: build |
| 28 |
run: | |
| 29 |
cd gen/pb-python/ |
| 30 |
make package |
| 31 |
|
| 32 |
- name: publish |
| 33 |
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 |
| 34 |
with: |
| 35 |
packages-dir: gen/pb-python/dist/ |