Skip to content

feat: add agent config history #68

feat: add agent config history

feat: add agent config history #68

Workflow file for this run

name: Desktop Release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: Tag to build (e.g. v1.5.36)
required: true
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
name: macOS
script: electron:build:mac
- os: windows-latest
name: Windows
script: electron:build:win
- os: ubuntu-latest
name: Linux
script: electron:build:linux
runs-on: ${{ matrix.os }}
timeout-minutes: 60
name: ${{ matrix.name }}
steps:
- name: Resolve tag
id: resolve_tag
shell: bash
env:
INPUT_TAG: ${{ github.event.inputs.tag }}
REF_NAME: ${{ github.ref_name }}
run: |
TAG_NAME="${INPUT_TAG:-$REF_NAME}"
case "$TAG_NAME" in
v[0-9]*.[0-9]*.[0-9]*|v[0-9]*.[0-9]*.[0-9]*-*)
;;
*)
echo "Refusing to build non-version tag: $TAG_NAME" >&2
exit 1
;;
esac
echo "tag=$TAG_NAME" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ steps.resolve_tag.outputs.tag }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Setup Python (for node-gyp)
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Sync package version with tag
shell: bash
env:
TAG: ${{ steps.resolve_tag.outputs.tag }}
run: |
TAG_VERSION="${TAG#v}"
CURRENT_VERSION="$(node -p "require('./package.json').version")"
if [ "$CURRENT_VERSION" != "$TAG_VERSION" ]; then
npm pkg set version="$TAG_VERSION"
fi
- name: Install dependencies
run: npm ci
env:
CI: 'true'
- name: Install Linux system deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libopenjp2-tools rpm fakeroot dpkg
- name: Install macOS system deps
if: matrix.os == 'macos-latest'
run: |
brew install pkg-config xz
- name: Prepare safe Windows HOME
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path "D:\\swarmclaw-home" | Out-Null
"USERPROFILE=D:\\swarmclaw-home" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
"HOMEDRIVE=D:" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
"HOMEPATH=\\swarmclaw-home" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Build desktop app
run: npm run ${{ matrix.script }} -- --publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
NEXT_TELEMETRY_DISABLED: '1'
- name: Upload build logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs-${{ matrix.name }}
path: |
release/**/*.log
release/builder-debug.yml
if-no-files-found: ignore