Skip to content

Commit 75e99d9

Browse files
fix(ci): select stable v1 backend tag
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
1 parent c64ab94 commit 75e99d9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/update_backend.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,18 @@ jobs:
1818
python -m pip install --upgrade pip
1919
pip install tomlkit
2020
21-
- name: "Get SymbolicRegression.jl latest version"
21+
- name: "Get SymbolicRegression.jl latest stable v1 version"
2222
id: get-latest
2323
run: |
2424
cd $(mktemp -d)
2525
git clone https://github.com/MilesCranmer/SymbolicRegression.jl
2626
cd SymbolicRegression.jl
27-
echo "version=$(git describe --tags --match='v*' --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
27+
latest_tag=$(git tag --list 'v1.*' | grep -E '^v1\.[0-9]+\.[0-9]+$' | sort -V | tail -n1)
28+
if [ -z "$latest_tag" ]; then
29+
echo "Failed to find a stable v1.*.* tag in SymbolicRegression.jl" >&2
30+
exit 1
31+
fi
32+
echo "version=${latest_tag#v}" >> $GITHUB_OUTPUT
2833
2934
- name: "Update SymbolicRegression.jl version in PySR"
3035
run: |
@@ -40,6 +45,7 @@ jobs:
4045
- name: "Create PR if necessary"
4146
uses: peter-evans/create-pull-request@v7
4247
with:
48+
base: release-v1
4349
title: "Automated update to backend: v${{ steps.get-latest.outputs.version }}"
4450
body: |
4551
This PR was automatically generated by the GitHub Action `.github/workflows/update-backend.yml`

0 commit comments

Comments
 (0)