Skip to content

Commit 8d325ed

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents de813e9 + 1afdb7c commit 8d325ed

File tree

2 files changed

+25
-43
lines changed

2 files changed

+25
-43
lines changed

.github/workflows/publish-upon-release.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,29 @@ jobs:
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

.github/workflows/update-toml-version.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)