Skip to content

Publish to TestPyPI and PyPI #22

Publish to TestPyPI and PyPI

Publish to TestPyPI and PyPI #22

Workflow file for this run

name: Publish to TestPyPI and PyPI
on:
workflow_dispatch:
inputs:
pypi_repo:
description: "Repo to upload to (TestPyPI or PyPI)"
default: "testpypi"
required: true
jobs:
build_wheels:
uses: ./.github/workflows/wheels.yml
publish:
name: Publish to TestPyPI and PyPI
runs-on: ubuntu-latest
needs: [build_wheels]
steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: "3.12"
# - name: Build
# run: |
# python -m pip install --upgrade pip
# python -m pip install build
# python -m build --sdist
- name: Download wheels
uses: actions/download-artifact@v4
with:
pattern: artifact-*/*.whl
path: dist
- name: Show files to upload
run: |
ls
echo '==='
ls -la dist
shell: bash -el {0}
# - name: Publish package to TestPyPI
# uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.TEST_PYPI_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}
#
# - name: Publish package to PyPI
# uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.PYPI_TOKEN }}
# if: ${{ github.event.inputs.pypi_repo == 'pypi' }}