-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.24 KB
/
release.yml
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
name: Release
on:
push:
tags:
- "*.*.*"
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.13"
python-version: 3.9
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Install dependencies
run: |
uv sync --group dev --group release --all-extras
- name: Set Package Version
run: |
# see https://github.com/astral-sh/uv/issues/6298#issuecomment-2335034247
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version ${GITHUB_REF#refs/*/}
- name: Build package
run: |
uv build
uv run twine check --strict dist/*
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
- name: Publish Github release
uses: softprops/action-gh-release@v2
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}