Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Releases

Viking releases are tag-driven. Use Node 22, keep the worktree clean, and run
the version step from a short-lived branch before publishing from `main`.

## 1. Check the release

Preview the next patch release without changing anything:

```sh
npm run release:dry-run
```

Use `minor`, `major`, or an exact version when needed:

```sh
npm run release:dry-run -- minor
npm run release:dry-run -- 1.2.3
```

## 2. Prepare the version PR

On a short-lived branch, bump the version and push the release commit:

```sh
npm run release:prepare:patch # or release:prepare:minor / release:prepare:major
```

Open a PR for the generated `Release vX.Y.Z` commit and merge it into `main`.

If the branch is not ready to push yet, add `--no-push` and push it later:

```sh
npm run release:prepare:patch -- --no-push
```

## 3. Publish from `main`

Sync local `main`, then create and push the tag:

```sh
git switch main
git pull --ff-only
npm run release:patch # or release:minor / release:major
```

The script creates `vX.Y.Z` and pushes it to `origin`. To publish an exact
version, use `npm run release -- 1.2.3`.

## Local builds

Use these before publishing when you want to inspect artifacts locally:

```sh
npm run pack:mac # unpacked Apple Silicon app
npm run dist:mac # macOS DMG and ZIP
npm run dist:win # Windows x64 installer and ZIP
npm run dist # current platform's installer
```

## What CI publishes

Pushing a `v*` tag starts `.github/workflows/release.yml`. It builds and
uploads Apple Silicon macOS DMG/ZIP files and Windows x64 NSIS/ZIP files to
the GitHub Release. The macOS unpacked build also runs its smoke test first.

Artifacts are unsigned: macOS may require Gatekeeper approval, Windows shows
an unknown-publisher warning, and macOS auto-update remains disabled.
14 changes: 13 additions & 1 deletion electron/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ let activeIdx = 0;
let mode: 'spotlight' | 'full' = 'full';
let rendererReady = false;
let pendingShow: { mode: 'textbox' | 'followup'; refineFrom?: Option } | null = null;
let queryNumber = 0;

// h is each mode's floor/initial height; content reports its real height via viking:resize.
const SIZES = {
Expand Down Expand Up @@ -180,7 +181,18 @@ async function captureScreen(): Promise<string | undefined> {
const sources = await desktopCapturer.getSources({ types: ['screen'], thumbnailSize: { width, height } });
const img = sources[0]?.thumbnail;
if (!img || img.isEmpty()) return undefined;
return nativeImage.createFromBuffer(img.toJPEG(70)).toDataURL();
const jpeg = img.toJPEG(70);
const screenshot = nativeImage.createFromBuffer(jpeg).toDataURL();
try {
const dir = path.join(app.getPath('pictures'), 'viking-screenshots');
const file = path.join(dir, `query-${Date.now()}-${++queryNumber}.jpg`);
fs.mkdirSync(dir, { recursive: true });
fs.writeFileSync(file, jpeg);
console.log('[viking] screenshot saved:', file);
} catch (error) {
console.warn('[viking] screenshot save failed:', error);
}
return screenshot;
} catch { return undefined; }
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "viking",
"version": "0.1.2",
"version": "0.1.3",
"private": true,
"description": "Floating AI coding assistant for macOS and Windows",
"author": "omavashia",
Expand Down
Loading