-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (36 loc) · 1.15 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
name: Python - Release
on:
release:
types: [published]
env:
PYTHON_VERSION: 3.12
jobs:
pypi-release:
name: Build and release Python package
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: pypi
url: https://pypi.org/project/chatlas/
permissions: # for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: 🚀 Install uv
uses: astral-sh/setup-uv@v3
- name: 🐍 Set up Python ${{ env.PYTHON_VERSION }}
run: uv python install ${{ env.PYTHON_VERSION }}
- name: 📦 Install the project
run: uv sync --python ${{ env.PYTHON_VERSION }} --all-extras
# Tests require API keys, and can be flaky at times due to quota limits,
# we skip them for release
#- name: 🧪 Check tests
# run: make check-tests
- name: 📝 Check types
run: make check-types
- name: 📐 Check formatting
run: make check-format
- name: 🧳 Build package
run: uv build
- name: 🚢 Publish release on PyPI
uses: pypa/gh-action-pypi-publish@release/v1