Skip to content

Publish rfmodal to PyPI #7

Publish rfmodal to PyPI

Publish rfmodal to PyPI #7

Workflow file for this run

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