Skip to content

Publish Python distributions to PyPI #1

Publish Python distributions to PyPI

Publish Python distributions to PyPI #1

Workflow file for this run

name: Publish Python distributions to PyPI
on:
release:
types: [published]
jobs:
build-n-publish:
if: ${{ github.repository == 'slaclab/lume-model' }}
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
environment: deployment
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build
run: |
python -m pip install build
- name: Build a source tarball
run: |
sudo python3 -m build
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1