Skip to content

Fetch version, pip install in workflow #10

Fetch version, pip install in workflow

Fetch version, pip install in workflow #10

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 (testpypi or pypi)'
default: 'testpypi'
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: $GITHUB_WORKSPACE/CompilerInterface/dist
- name: Publish package to TestPyPI
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/
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' }}