-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (29 loc) · 990 Bytes
/
_dist.yml
File metadata and controls
37 lines (29 loc) · 990 Bytes
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
on:
workflow_call:
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v5
with:
# Need this to get version number from last tag
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build sdist and wheel
run: >
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
uvx --from build pyproject-build
- name: Upload sdist and wheel as artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- name: Check for packaging errors
run: uvx twine check --strict dist/*
- name: Install produced wheel
run: python -m pip install dist/*.whl
- name: Test module --version works using the installed wheel
# If more than one module in src/ replace with module name to test
run: python -m $(ls --hide='*.egg-info' src | head -1) --version