File tree Expand file tree Collapse file tree 2 files changed +25
-43
lines changed Expand file tree Collapse file tree 2 files changed +25
-43
lines changed Original file line number Diff line number Diff line change 1313 steps :
1414 - uses : actions/checkout@v3
1515 - name : Publish crates for llama-cpp-sys-2
16- run : cargo publish --package llama-cpp-sys-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
16+ run : cargo publish --package llama-cpp-sys-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose --dry-run
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 --dry-run
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+
33+
34+ # Commit the changes
35+ git config --global user.email "[email protected] " 36+ git config --global user.name "GitHub Actions"
37+ git add llama-cpp-sys-2/Cargo.toml llama-cpp-2/Cargo.toml
38+ git commit -m "Bump version to $NEXT_VERSION [skip ci]"
39+
40+ # Push the changes back to the repository
41+ git push origin main:$GITHUB_REF
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments