Skip to content

Migrate from PyPI tokens to Trusted Publishers (#304) #189

Migrate from PyPI tokens to Trusted Publishers (#304)

Migrate from PyPI tokens to Trusted Publishers (#304) #189

Workflow file for this run

on:
push:
branches:
- main
release:
types: [published]
workflow_dispatch:
name: Publish
jobs:
publish:
environment: pypi
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install pypa/build
run: python -m pip install build
- name: Build the package
run: |
python -m build --sdist --wheel \
--outdir dist/ .
- name: Publish
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1