Skip to content

Commit f7681e4

Browse files
committed
update pkg version in ci release
1 parent b7a67c6 commit f7681e4

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Build release daemon
22

33
on:
44
push:
@@ -105,3 +105,34 @@ jobs:
105105
name: ${{ steps.meta.outputs.tag }}
106106
files: artifacts/*
107107
fail_on_unmatched_files: true
108+
109+
bump-version:
110+
needs: release
111+
runs-on: ubuntu-latest
112+
113+
permissions:
114+
contents: write
115+
116+
steps:
117+
- uses: actions/checkout@v4
118+
119+
- name: Bump patch version in Cargo.toml files
120+
shell: bash
121+
run: |
122+
VERSION=$(grep '^version' splitway-daemon/Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
123+
MAJOR=$(echo "$VERSION" | cut -d. -f1)
124+
MINOR=$(echo "$VERSION" | cut -d. -f2)
125+
PATCH=$(echo "$VERSION" | cut -d. -f3)
126+
NEW_PATCH=$((PATCH + 1))
127+
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
128+
sed -i "s/^version = \"$VERSION\"/version = \"$NEW_VERSION\"/" splitway-daemon/Cargo.toml
129+
echo "Bumped $VERSION -> $NEW_VERSION"
130+
131+
- name: Commit and push version bump
132+
shell: bash
133+
run: |
134+
git config user.name "github-actions[bot]"
135+
git config user.email "github-actions[bot]@users.noreply.github.com"
136+
git add splitway-daemon/Cargo.toml
137+
git commit -m "chore: bump version after release"
138+
git push

0 commit comments

Comments
 (0)