File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 - name : Install dependencies
5252 run : npm ci
5353
54+ # electron-builder reads `version` from package.json for artifact
55+ # naming (e.g. OpenCluely-1.0.0-x64.dmg). When we build from a
56+ # git tag (v1.0.7) the package.json still says 1.0.0 by default,
57+ # so artifact names drift from the release tag. Sync them here.
58+ # `npm pkg set` is cross-platform and doesn't touch git.
59+ - name : Sync package.json version from tag
60+ if : startsWith(github.ref, 'refs/tags/v')
61+ shell : bash
62+ run : |
63+ VERSION="${GITHUB_REF_NAME#v}"
64+ echo "Tag version: $VERSION"
65+ CURRENT=$(node -p "require('./package.json').version")
66+ echo "Current package.json version: $CURRENT"
67+ if [ "$VERSION" != "$CURRENT" ]; then
68+ npm pkg set "version=$VERSION"
69+ echo "Updated package.json to $VERSION"
70+ else
71+ echo "Version already matches tag"
72+ fi
73+
5474 # Linux: install LinuxBuild dependencies so electron-builder can produce .deb / .AppImage
5575 - name : Install Linux build dependencies
5676 if : matrix.os == 'ubuntu-latest'
You can’t perform that action at this time.
0 commit comments