Skip to content
name: Publish Python Package
on:
push: # Trigger the workflow on every push to any branch
branches:
- '**' # This includes all branches
# on:
# push:
# tags:
# - 'v*.*.*' # Trigger on version tags
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read # Required for checking out the repository
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Use the correct Python version
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build the package
run: python -m build
- name: Publish to PyPI using Trusted Publishing
uses: pypa/gh-action-pypi-publish@release/v1
with:

Check failure on line 39 in .github/workflows/python-publish.yml

View workflow run for this annotation

GitHub Actions / Publish Python Package

Invalid workflow file

The workflow is not valid. .github/workflows/python-publish.yml (Line: 39, Col: 14): Unexpected value ''
# No need for credentials, PyPI will handle authentication via OIDC
# Optionally, specify your PyPI repository if needed (testpypi or pypi)
# repository-url: https://test.pypi.org/legacy/