Skip to content

Commit f760ec9

Browse files
committed
ci
1 parent 1ff1689 commit f760ec9

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/sync-mlx.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,29 @@ jobs:
5050
git -C extern/mlx checkout ${{ steps.mlx.outputs.latest_tag }}
5151
git add extern/mlx
5252
53+
- name: Setup Python
54+
if: steps.mlx.outputs.update_needed == 'true'
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: '3.x'
58+
5359
- name: Update package versions
5460
if: steps.mlx.outputs.update_needed == 'true'
5561
env:
5662
VERSION: ${{ steps.mlx.outputs.latest_version }}
5763
run: |
58-
python <<'PY'
59-
import os
60-
import re
61-
from pathlib import Path
64+
python3 <<'PY'
65+
import os
66+
import re
67+
from pathlib import Path
6268
63-
version = os.environ["VERSION"]
64-
props_path = Path("Directory.Build.props")
65-
text = props_path.read_text()
66-
text = re.sub(r"<Version>[^<]+</Version>", f"<Version>{version}</Version>", text)
67-
text = re.sub(r"<PackageVersion>[^<]+</PackageVersion>", f"<PackageVersion>{version}</PackageVersion>", text)
68-
props_path.write_text(text)
69-
PY
69+
version = os.environ["VERSION"]
70+
props_path = Path("Directory.Build.props")
71+
text = props_path.read_text()
72+
text = re.sub(r"<Version>[^<]+</Version>", f"<Version>{version}</Version>", text)
73+
text = re.sub(r"<PackageVersion>[^<]+</PackageVersion>", f"<PackageVersion>{version}</PackageVersion>", text)
74+
props_path.write_text(text)
75+
PY
7076
git add Directory.Build.props
7177
- name: Setup .NET
7278
if: steps.mlx.outputs.update_needed == 'true'

0 commit comments

Comments
 (0)