Skip to content

Publish to PyPI using https://docs.pypi.org/trusted-publishers/ #93

Publish to PyPI using https://docs.pypi.org/trusted-publishers/

Publish to PyPI using https://docs.pypi.org/trusted-publishers/ #93

Workflow file for this run

name: pypi
on:
pull_request:
release:
types: [released]
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3
- name: Install Dependencies
run: |
pip install build
- name: Build rez
run: |
python -m build --sdist --wheel --outdir dist
# Note that we don't need credentials.
# We rely on https://docs.pypi.org/trusted-publishers/.
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: dist