| 1 |
name: Publish |
| 2 |
|
| 3 |
on: |
| 4 |
release: |
| 5 |
types: |
| 6 |
- published |
| 7 |
|
| 8 |
permissions: {} |
| 9 |
|
| 10 |
jobs: |
| 11 |
publish: |
| 12 |
runs-on: ubuntu-latest |
| 13 |
permissions: |
| 14 |
id-token: write |
| 15 |
contents: read |
| 16 |
timeout-minutes: 5 |
| 17 |
steps: |
| 18 |
- name: Dump GitHub context |
| 19 |
env: |
| 20 |
GITHUB_CONTEXT: ${{ toJson(github) }} |
| 21 |
run: echo "$GITHUB_CONTEXT" |
| 22 |
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 23 |
with: |
| 24 |
persist-credentials: false |
| 25 |
- name: Set up Python |
| 26 |
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
| 27 |
with: |
| 28 |
python-version-file: ".python-version" |
| 29 |
- name: Install uv |
| 30 |
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0 |
| 31 |
with: |
| 32 |
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum. |
| 33 |
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837 |
| 34 |
version: "0.11.18" |
| 35 |
enable-cache: "false" |
| 36 |
- name: Build distribution |
| 37 |
run: uv build |
| 38 |
- name: Publish |
| 39 |
run: uv publish |