Skip to content

Commit 0c97a80

Browse files
committed
Add GH build workflow
1 parent 444ce9b commit 0c97a80

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

.github/workflows/build.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
concurrency:
9+
group: build-${{ github.head_ref }}
10+
11+
jobs:
12+
build:
13+
name: Build wheel and source distribution
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install uv and set the python version
19+
uses: astral-sh/setup-uv@v5
20+
with:
21+
enable-cache: true
22+
cache-dependency-glob: "uv.lock"
23+
version: "0.5.29"
24+
25+
- name: Build
26+
run: uv build
27+
28+
- name: Stash dist artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: artifacts
32+
path: dist/*
33+
if-no-files-found: error
34+
35+
publish:
36+
name: Publish release
37+
needs: [build]
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- name: Unstash dist artifacts
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: artifacts
45+
path: dist
46+
47+
- name: Push build artifacts to PyPI
48+
uses: pypa/[email protected]
49+
with:
50+
skip_existing: true
51+
user: __token__
52+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test
22
on: [push]
33
jobs:
44
build:
5-
name: continuous-integration
5+
name: Run pytest
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
@@ -20,6 +20,7 @@ jobs:
2020
with:
2121
enable-cache: true
2222
cache-dependency-glob: "uv.lock"
23+
version: "0.5.29"
2324
python-version: ${{ matrix.python-version }}
2425

2526
- name: Install the project

0 commit comments

Comments
 (0)