Publish rfmodal to PyPI #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish rfmodal to PyPI | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
release: | |
types: [created] | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: release | |
url: https://pypi.org/project/rfmodal/ | |
permissions: | |
id-token: write # Required for OIDC/Trusted Publishing | |
contents: read | |
steps: | |
- name: ποΈ Checkout | |
uses: actions/checkout@v4 | |
- name: π Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: π§ Install Protobuf Compiler | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y protobuf-compiler | |
protoc --version | |
- name: π¦ Install build dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build twine grpclib protobuf | |
- name: π¨ Generate protobuf files | |
run: | | |
chmod +x build_for_pypi.sh | |
./build_for_pypi.sh | |
- name: ποΈ Build package | |
run: | | |
python -m build | |
twine check dist/* | |
- name: π Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
attestations: true |