-
Notifications
You must be signed in to change notification settings - Fork 146
87 lines (67 loc) · 2.03 KB
/
source-package.yml
File metadata and controls
87 lines (67 loc) · 2.03 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Source package
on: [push, pull_request]
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -qq swig libpcsclite-dev
- name: Install the project
run: uv sync --locked
- name: Run pre-commit hooks
run: |
uv tool install pre-commit
pre-commit run --all-files --verbose
- name: Run unit tests
run: uv run pytest
- name: Create source package
run: |
# poetry will by default set all timestamps to 0, which Debian doesn't allow
export SOURCE_DATE_EPOCH=$(git show --no-patch --format=%ct)
uv build
mkdir artifacts
mv dist/yubikey_manager-*.tar.gz artifacts/
mv dist/yubikey_manager-*.whl artifacts/
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: yubikey-manager-source-package
path: artifacts
docs:
runs-on: ubuntu-latest
name: Build sphinx documentation
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Install python dependencies
run: |
sudo apt-get update
sudo apt-get install -qq swig libpcsclite-dev
- name: Install the project
run: uv sync --locked
- name: Build sphinx documentation
run: uv run make -C docs/ html
- name: Upload documentation
uses: actions/upload-artifact@v6
with:
name: yubikey-manager-docs
path: docs/_build/html