@@ -11,38 +11,24 @@ jobs:
1111 steps :
1212 - uses : actions/checkout@v4
1313 with :
14- submodules : true
1514 fetch-depth : 0
1615
17- - name : Get current submodule commit
16+ - name : Get current upstream version
1817 id : current
19- run : echo "sha=$(git -C openclaw rev-parse HEAD)" >> "$GITHUB_OUTPUT"
20-
21- - name : Fetch latest upstream release
22- id : upstream
23- env :
24- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2518 run : |
26- LATEST=$(gh api repos/openclaw/openclaw/releases/latest --jq '.tag_name')
27- echo "tag=$LATEST" >> "$GITHUB_OUTPUT"
28- # Strip leading 'v' if present for the version string
29- VERSION="${LATEST#v}"
19+ VERSION=$(jq -r '.upstreamVersion' dappnode_package.json)
3020 echo "version=$VERSION" >> "$GITHUB_OUTPUT"
3121
32- - name : Update submodule to latest release
33- id : update
22+ - name : Fetch latest npm version
23+ id : upstream
3424 run : |
35- cd openclaw
36- git fetch --tags origin
37- git checkout ${{ steps.upstream.outputs.tag }}
38- cd ..
39- NEW_SHA=$(git -C openclaw rev-parse HEAD)
40- echo "sha=$NEW_SHA" >> "$GITHUB_OUTPUT"
25+ LATEST=$(npm view openclaw version)
26+ echo "version=$LATEST" >> "$GITHUB_OUTPUT"
4127
4228 - name : Check if update is needed
4329 id : check
4430 run : |
45- if [ "${{ steps.current.outputs.sha }}" = "${{ steps.update .outputs.sha }}" ]; then
31+ if [ "${{ steps.current.outputs.version }}" = "${{ steps.upstream .outputs.version }}" ]; then
4632 echo "changed=false" >> "$GITHUB_OUTPUT"
4733 else
4834 echo "changed=true" >> "$GITHUB_OUTPUT"
@@ -72,11 +58,11 @@ jobs:
7258 fi
7359
7460 git checkout -b "$BRANCH"
75- git add openclaw dappnode_package.json
61+ git add dappnode_package.json
7662 git commit -m "Bump openclaw upstream to ${VERSION}"
7763 git push origin "$BRANCH"
7864
7965 gh pr create \
8066 --title "Bump openclaw upstream to ${VERSION}" \
81- --body "Bumps openclaw submodule to release \`${{ steps.upstream.outputs.tag } }\`." \
67+ --body "Bumps openclaw npm package to version \`${VERSION }\`." \
8268 --base main
0 commit comments