-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (47 loc) · 1.4 KB
/
Copy pathrelease.yml
File metadata and controls
57 lines (47 loc) · 1.4 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
47
48
49
50
51
52
53
54
55
56
57
name: Release
on:
release:
types:
- published
workflow_dispatch:
inputs:
tag:
description: Git tag to publish, for example v0.0.1.
required: true
concurrency:
group: release-${{ github.workflow }}-${{ inputs.tag || github.ref }}
cancel-in-progress: false
permissions: {}
jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/druks/
permissions:
contents: read
id-token: write # required for PyPI Trusted Publisher OIDC exchange
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
# A dispatch publishes the tag it was given; a published release
# publishes its own tag. Neither builds whatever main happens to be.
ref: ${{ inputs.tag || github.event.release.tag_name }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: "0.10.9"
- name: Build wheel + sdist
run: uv build --out-dir dist
- name: Validate distribution metadata
run: uv run --with twine twine check --strict dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1