-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (38 loc) · 1.01 KB
/
publish.yml
File metadata and controls
46 lines (38 loc) · 1.01 KB
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
42
43
44
45
46
name: Publish to PyPI
on:
release:
types: [created]
permissions:
contents: read
jobs:
ci:
name: Run CI
uses: ./.github/workflows/ci.yml
publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
timeout-minutes: 10
needs: ci
environment:
name: pypi
url: https://pypi.org/p/pydocket
permissions:
id-token: write # Required for trusted publishing and PEP 740 attestations
contents: read
steps:
- uses: actions/checkout@v6
with:
# Need full history for proper versioning with hatch-vcs
fetch-depth: 0
- name: Install uv and set Python version
uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Build package
run: uv build
- name: Publish to PyPI with PEP 740 attestations
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/