Skip to content

Upload Python Package to PyPi #15

Upload Python Package to PyPi

Upload Python Package to PyPi #15

Workflow file for this run

# This workflow will upload a Python Package when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
name: Upload Python Package to PyPi
on:
release:
types: [published]
permissions:
contents: write
id-token: write
jobs:
run_test_suite:
uses: ./.github/workflows/python-test.yml
deploy:
runs-on: ubuntu-latest
needs: run_test_suite
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}