-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (31 loc) · 939 Bytes
/
publish.yml
File metadata and controls
35 lines (31 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This workflow publishes the package to PyPI on GitHub Release creation.
# Uses Trusted Publisher (OIDC) — no API tokens required.
# Docs: https://docs.pypi.org/trusted-publishers/
#
# Before first use, configure a Trusted Publisher on PyPI:
# https://pypi.org/manage/account/publishing/
name: Publish to PyPI
on:
release:
types: [published]
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: pypi-publish
permissions:
id-token: write # Required for Trusted Publisher (OIDC)
steps:
- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1