-
Notifications
You must be signed in to change notification settings - Fork 38
43 lines (38 loc) · 876 Bytes
/
Copy pathpublish.yml
File metadata and controls
43 lines (38 loc) · 876 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
42
43
name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
# Run the full test suite here so nothing reaches PyPI without
# passing tests.
test:
uses: ./.github/workflows/ci.yml
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.1.0
with:
activate-environment: true
- name: Build
run: uv build
- uses: actions/upload-artifact@v7
with:
name: dist
path: dist/
publish:
needs: [test, build]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1