-
Notifications
You must be signed in to change notification settings - Fork 17
77 lines (68 loc) · 1.85 KB
/
Copy pathdeploy.py.yaml
File metadata and controls
77 lines (68 loc) · 1.85 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
name: Deploy - Python
on:
push:
branches:
- main
paths:
- .github/workflows/deploy.py.yaml
- alamos/py/**
- freighter/py/**
- client/py/**
- pyproject.toml
- uv.lock
- uv.toml
workflow_dispatch:
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: client/py/pyproject.toml
- name: Diff Changes
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
filters: |
shared: &shared
- .github/workflows/deploy.py.yaml
- pyproject.toml
- uv.lock
- uv.toml
alamos: &alamos
- *shared
- alamos/py/**
freighter: &freighter
- *shared
- *alamos
- freighter/py/**
client:
- *shared
- *freighter
- client/py/**
- name: Publish Alamos
if: steps.filter.outputs.alamos == 'true'
working-directory: alamos/py
run: uv build
- name: Publish Freighter
if: steps.filter.outputs.freighter == 'true'
working-directory: freighter/py
run: uv build
- name: Publish Client
if: steps.filter.outputs.client == 'true'
working-directory: client/py
run: uv build
- name: Publish Code
if:
steps.filter.outputs.alamos == 'true' || steps.filter.outputs.freighter ==
'true' || steps.filter.outputs.client == 'true'
run: uv publish