File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 1515 - name : Publish crates for llama-cpp-sys-2
1616 run : cargo publish --package llama-cpp-sys-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
1717 - name : Publish crates for llama-cpp-2
18- run : cargo publish --package llama-cpp-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
18+ run : cargo publish --package llama-cpp-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
19+ - name : Update version in TOML files
20+ run : |
21+ # Extract the current version from the TOML file
22+ CURRENT_VERSION=$(awk -F '"' '/^version/ {print $2}' llama-cpp-2/Cargo.toml)
23+
24+ # Increment the version
25+ NEXT_VERSION=$(echo "$CURRENT_VERSION" | awk -F. -v OFS=. '{++$NF; print}')
26+
27+ # Update version in llama-cpp-sys-2 Cargo.toml
28+ sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" llama-cpp-sys-2/Cargo.toml
29+
30+ # Update version in llama-cpp-2 Cargo.toml
31+ sed -i "s/^version = \".*\"/version = \"$NEXT_VERSION\"/g" llama-cpp-2/Cargo.toml
32+ sed -i "s/^\(llama-cpp-sys-2 = { path = \"\.\.\/llama-cpp-sys-2\", version = \)\"$CURRENT_VERSION\"/\1\"$NEXT_VERSION\"/" llama-cpp-2/Cargo.toml
33+
34+
35+ # Commit the changes
36+ git config --global user.email "[email protected] " 37+ git config --global user.name "GitHub Actions"
38+ git add llama-cpp-sys-2/Cargo.toml llama-cpp-2/Cargo.toml
39+ git commit -m "Bump version to $NEXT_VERSION [skip ci]"
40+
41+ # Push the changes back to the repository
42+ git push origin main:$GITHUB_REF
You can’t perform that action at this time.
0 commit comments