-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (31 loc) · 973 Bytes
/
Copy pathpublish.yml
File metadata and controls
39 lines (31 loc) · 973 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
36
37
38
39
name: Publish to PyPI and GitHub
on:
release:
types: [published]
jobs:
build-and-publish:
name: Build and Publish Wheels
runs-on: ubuntu-latest
# SECURITY ENFORCEMENT: OIDC Auth
# This allows GitHub to securely authenticate with PyPI without you needing to store a password.
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"
- name: Build Package (sdist and wheel)
# uv natively replaces standard 'build' and 'twine'
run: uv build
- name: Publish to PyPI
# This uses PyPI's official Trusted Publisher standard (OIDC)
uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload Artifacts to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*