Skip to content

Update upload_pypi.yml #23

Update upload_pypi.yml

Update upload_pypi.yml #23

Workflow file for this run

name: Upload to PyPI
on:
release:
types:
- published
push:
branches:
- pip-package # or
workflow_dispatch:
inputs:
pypi_repo:
description: 'Repo to upload to pypi'
default: 'pypi'
required: true
type: choice
options:
- testpypi
- pypi
jobs:
build_wheels:
uses: ./.github/workflows/wheel.yml
upload_pypi:
permissions:
id-token: write
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: ./CompilerInterface/dist
# - name: Publish package to TestPyPI
# uses: pypa/[email protected]
# with:
# repository-url: https://test.pypi.org/legacy/
# packages-dir: ./CompilerInterface/dist
# if: ${{ github.event.inputs.pypi_repo != 'pypi' }}
- name: Publish package to PyPI
uses: pypa/[email protected]
with:
repository-url: https://upload.pypi.org/legacy/
# if: ${{ github.event.inputs.pypi_repo == 'pypi' }}