-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 955 Bytes
/
python-publish.yml
File metadata and controls
41 lines (37 loc) · 955 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
40
41
name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: pipx install 'uv==0.9.17'
- name: Publish package
run: |
uv build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
pypi-publish:
name: upload release to PyPI
needs: [build-dist]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: pypi
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1