-
Notifications
You must be signed in to change notification settings - Fork 13
40 lines (32 loc) · 1.14 KB
/
_dist.yml
File metadata and controls
40 lines (32 loc) · 1.14 KB
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
on:
workflow_call:
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
# Need this to get version number from last tag
fetch-depth: 0
- name: Install
uses: ./.github/actions/install_requirements
- name: Build sdist and wheel
run: >
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
uv build
- name: Upload sdist and wheel as artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dist
path: dist
- name: Check for packaging errors
run: uvx twine check --strict dist/*
- name: Install produced wheel
uses: ./.github/actions/install_requirements
with:
# TODO: figure out what's going on
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