feat: validate version format in auto-updater and release workflow

- Added a check in the desktop release workflow to ensure version tags follow semantic versioning (semver) format.
- Enhanced the auto-updater to log a message and skip updates if the app version is not valid semver.
- Improved type definitions for event handlers in the auto-updater for better TypeScript support.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-04-07 20:07:15 -07:00
parent f428cd97d9
commit 6dd85dd365
2 changed files with 18 additions and 5 deletions

View file

@ -52,6 +52,10 @@ jobs:
VERSION=${TAG#beta-}
VERSION=${VERSION#v}
fi
if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$'; then
echo "::error::Version '$VERSION' is not valid semver (expected X.Y.Z). Fix your tag name."
exit 1
fi
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- name: Setup pnpm