Skip to content

REL: automate release upload to PyPI #1

REL: automate release upload to PyPI

REL: automate release upload to PyPI #1

Workflow file for this run

name: Publish to PyPI
on:
push:
tags: v*
pull_request:
paths:
- .github/workflows/publish.yml
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/unyt
permissions:
id-token: write
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install build dependencies
run: python -m pip install build wheel
- name: Build distributions
shell: bash -l {0}
run: python -m build
- name: Publish package distributions to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1