-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.13 KB
/
pin_requirements.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
name: Generate Requirements Files
on:
workflow_dispatch:
jobs:
generate-requirements:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.5.4"
- name: Generate requirements file
run: uv pip compile --all-extras pyproject.toml -o requirements-${{ matrix.os }}-${{ matrix.python-version }}.txt
- name: Upload requirements file
uses: actions/upload-artifact@v4
with:
name: req-artifact-${{ matrix.os }}-${{ matrix.python-version }}
path: requirements-${{ matrix.os }}-${{ matrix.python-version }}.txt
merge:
runs-on: ubuntu-latest
needs: generate-requirements
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: all-requirements
pattern: req-artifact-*