-
-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (42 loc) · 1.06 KB
/
ci.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
name: CI
on:
push:
branches: ["main", "renovate/*"]
tags: ["*.*.*"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') != true
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- run: uv run --frozen pyright sachi/
- run: uv run --frozen ruff check sachi/
if: always()
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- run: uv build
- run: uv publish
- run: |
gh release create ${{ github.ref_name }} dist/* \
--draft \
--generate-notes \
--notes-start-tag $(git tag --sort -v:refname | head -n2 | tail -n1)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}