Publish Release to PyPI #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Release to PyPI | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: The branch, tag, or commit SHA1 to build the release from. | |
jobs: | |
pypi-publish: | |
name: Upload a release to PyPI | |
runs-on: ubuntu-latest | |
environment: pypi-release | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.ref }} | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install pypa/build | |
run: python3 -m pip install -U build --user | |
- name: Build Package | |
run: make build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |