Skip to content

Package and upload to PyPI #4

Package and upload to PyPI

Package and upload to PyPI #4

Workflow file for this run

name: Package and upload to PyPI
# Publish when a (published) GitHub Release is created, or manually
on:
workflow_dispatch:
release:
types:
- published
jobs:
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
publish-to-pypi:
name: Publish to PyPI
needs: make_sdist
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/trustregion
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1