Skip to content
86 changes: 86 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Build and Release

on:
push:
tags:
- 'v*' # Trigger on version tags like v1.0.0

jobs:
build:
permissions:
contents: read

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build for macOS
if: matrix.os == 'macos-latest'
run: npx electron-builder --mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build for Windows
if: matrix.os == 'windows-latest'
run: npx electron-builder --win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: npx electron-builder --linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-build
path: |
dist/*.dmg
dist/*.exe
dist/*.AppImage
dist/*.yml

release:
needs: build
runs-on: ubuntu-latest

permissions:
contents: write # Needed to create releases

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4.1.3
with:
path: artifacts

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/**/*.dmg
artifacts/**/*.exe
artifacts/**/*.AppImage
artifacts/**/*.yml
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ A voice input method software built with Electron that allows you to dictate tex
- **Real-time Audio Visualization**: Beautiful waveform animation while recording
- **AI Transcription**: Uses Groq's Whisper API for accurate speech-to-text
- **Auto-typing**: Automatically types transcribed text into active application (macOS)
- **Auto-update**: Automatically checks for updates and notifies when new versions are available
- **Cross-platform**: Works on macOS, Windows, and Linux
- **Background Operation**: Runs silently in the system tray
- **Customizable Settings**: Configure API key, microphone, and languages
Expand Down Expand Up @@ -50,6 +51,30 @@ npm run dev
npm run build
```

## Auto-Updates

WhispLine includes automatic update functionality:

- **Automatic Check**: On app startup, WhispLine automatically checks for new versions (in production builds only)
- **Manual Check**: Right-click the system tray icon and select "Check for Updates"
- **Update Process**: When an update is available, you'll be prompted to download it. Once downloaded, you can choose to install immediately or install on next app restart
- **GitHub Releases**: Updates are distributed via GitHub Releases. When building for release, use `npm run build` which will create distributable files compatible with the auto-updater

**Note**: Auto-update is disabled in development mode (`npm run dev`).

### Creating a Release

To create a new release with auto-update support:

1. Update the version in `package.json` (or use `npm version patch/minor/major`)
2. Create and push a git tag:
```bash
git tag v1.0.75
git push origin v1.0.75
```
3. The GitHub Actions workflow will automatically build and publish the release
4. Users will be notified of the update on their next app launch

## Console Character Encoding (Windows)

On Windows, the console may display non-English characters as garbled text due to PowerShell/CMD output encoding settings.
Expand Down
114 changes: 107 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,24 @@
},
"dependencies": {
"auto-launch": "^5.0.6",
"electron-log": "^5.4.3",
"electron-store": "^10.1.0",
"electron-updater": "^6.7.3",
"groq-sdk": "^0.30.0",
"koffi": "^2.13.0",
"openai": "^4.57.0",
"uiohook-napi": "^1.5.4",
"koffi": "^2.13.0"
"uiohook-napi": "^1.5.4"
},
"build": {
"appId": "com.tao.whispline",
"productName": "WhispLine",
"publish": [
{
"provider": "github",
"owner": "hellotaotao",
"repo": "WhispLine"
}
],
"directories": {
"output": "dist"
},
Expand Down
Loading