Skip to content

Commit 30f9cc9

Browse files
committed
Make CI set version for electron packager
1 parent dfba37e commit 30f9cc9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,15 @@ jobs:
164164
mkdir -p gui/dist/artifacts/linux/ \
165165
gui/dist/artifacts/win \
166166
gui/dist/artifacts/mac
167+
VERSION=$(git --no-pager tag --sort -taggerdate --points-at HEAD | head -1)
168+
[ -z "$VERSION" ] && VERSION="0.0.0"
169+
VERSION="${VERSION#v}"
170+
echo "Building version: $VERSION"
167171
cd gui
168172
pnpm i
169173
pnpm exec electron-builder --${{ matrix.platform }} \
170174
${{ matrix.platform == 'macos' && '--universal' || '' }} \
175+
--config.extraMetadata.version="$VERSION" \
171176
--publish never
172177
- name: Collect and Rename Artifacts
173178
shell: bash

0 commit comments

Comments
 (0)