Skip to content

permissions

permissions #3

Workflow file for this run

name: Publish Python package
on:
push:
# Publish on version tags e.g. v1.2.3
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read # allow checkout of the source code
id-token: write # still needed for OIDC → PyPI upload
steps:
- name: Check out code
uses: actions/checkout@v3
with:
token: ${{ github.token }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install build tools
run: |
python -m pip install --upgrade pip build
- name: Build wheel and sdist
run: |
cd inference_lib
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: inference_lib/dist/