Skip to content

Commit 9d8ed36

Browse files
committed
ci: update release please
1 parent 2aa469b commit 9d8ed36

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/release-pr.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,26 @@ jobs:
3030
token: ${{ secrets.RP_SECRET }}
3131
config-file: .release-config.json
3232
manifest-file: .release-manifest.json
33+
34+
- name: Parse release-please head branch
35+
if: ${{ steps.release.outputs.prs_created }}
36+
run: |
37+
BRANCH=$(echo '${{ steps.release.outputs.pr }}' | jq -r '.headBranchName')
38+
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
39+
40+
- name: Update Cargo.toml
41+
if: ${{ steps.release.outputs.prs_created }}
42+
run: |
43+
git config user.name "github-actions[bot]"
44+
git config user.email "github-actions[bot]@users.noreply.github.com"
45+
git fetch
46+
git checkout $BRANCH
47+
48+
echo "Updating root Cargo.toml"
49+
sed -i -e "s/rust-mcp-macros = { version = \"[^\"]*\",/rust-mcp-macros = { version = \"$(grep '^version = ' crates/rust-mcp-macros/Cargo.toml | cut -d' ' -f3 | tr -d '\"')\",/" \
50+
-e "s/rust-mcp-transport = { version = \"[^\"]*\",/rust-mcp-transport = { version = \"$(grep '^version = ' crates/rust-mcp-transport/Cargo.toml | cut -d' ' -f3 | tr -d '\"')\",/" \
51+
Cargo.toml
52+
53+
git add ./Cargo.toml
54+
git commit -m "chore: update Cargo.toml for release"
55+
git push

0 commit comments

Comments
 (0)