name: publish-pypi

on:
  workflow_call:
    inputs:
      pypi_repository_url:
        required: true
        type: string
    secrets:
      pypi_api_token:
        required: true

jobs:
  publish-pypi:
    name: Publish distribution 📦s to PyPI/TestPyPI
    runs-on: ubuntu-latest
    steps:
        - uses: actions/checkout@v3
        - uses: actions/setup-python@v4
          with:
            python-version: "3.10"
        - name: Install pypa/build
          run: python -m pip install build twine --upgrade --user
        - name: Build a binary wheel and a source tarball
          run: python -m build --sdist --wheel --outdir dist/ .
        - name: Check with twine
          run: twine check dist/*
        - name: Publish distribution 📦 to PyPI
          uses: pypa/gh-action-pypi-publish@master
          with:
            password: ${{ secrets.pypi_api_token }}
            repository_url: ${{ inputs.pypi_repository_url }}

name: publish-pypi

on:
  workflow_call:
    inputs:
      pypi_repository_url:
        required: true
        type: string
    secrets:
      pypi_api_token:
        required: true

jobs:
  publish-pypi:
    name: Publish distribution 📦s to PyPI/TestPyPI
    runs-on: ubuntu-latest
    steps:
        - uses: actions/checkout@v3
        - uses: actions/setup-python@v4
          with:
            python-version: "3.10"
        - name: Install pypa/build
          run: python -m pip install build twine --upgrade --user
        - name: Build a binary wheel and a source tarball
          run: python -m build --sdist --wheel --outdir dist/ .
        - name: Check with twine
          run: twine check dist/*
        - name: Publish distribution 📦 to PyPI
          uses: pypa/gh-action-pypi-publish@release/v1
          with:
            password: ${{ secrets.pypi_api_token }}
            repository_url: ${{ inputs.pypi_repository_url }}

Use correct version for gh-action-pypi-publish
Use correct version for gh-action-pypi-publish
