File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Release
1+ name : Build release daemon
22
33on :
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
You can’t perform that action at this time.
0 commit comments