openpencil/.github/workflows/build.yml
Danila Poyarkov 7e06969ab5 Multi-selection properties panel with tests
Show position, appearance, fill, stroke, and effects sections
when multiple nodes are selected. Shared values display normally,
differing values show 'Mixed'. Editing applies to all selected.

- Shared composable (use-multi-props) for isMulti, active, activeNode
- ScrubInput supports MIXED symbol as model-value
- Per-node previous values for correct undo on multi-edit
- Fix flip transform encoding (scale first column only)
- Fix npm publish auth for MCP package
- 22 new tests: flip, alignment, multi-node merging, kiwi roundtrip
2026-03-03 20:35:51 +03:00

131 lines
3.7 KiB
YAML

name: Build
on:
workflow_dispatch:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
target: aarch64-apple-darwin
label: macos-arm64
- platform: macos-latest
target: x86_64-apple-darwin
label: macos-x64
- platform: windows-latest
target: x86_64-pc-windows-msvc
label: windows-x64
- platform: windows-latest
target: aarch64-pc-windows-msvc
label: windows-arm64
- platform: ubuntu-22.04
target: x86_64-unknown-linux-gnu
label: linux-x64
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: desktop/src-tauri -> target
key: ${{ matrix.target }}
- name: Install dependencies (Linux)
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-
- run: bun install
- name: Extract release notes
id: changelog
uses: ffurrer2/extract-release-notes@v2
- name: Build Tauri
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY || '' }}
with:
tauriScript: bunx tauri
args: --target ${{ matrix.target }}
tagName: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || '' }}
releaseName: ${{ startsWith(github.ref, 'refs/tags/v') && format('OpenPencil {0}', github.ref_name) || '' }}
releaseBody: ${{ steps.changelog.outputs.release_notes }}
releaseDraft: false
publish-npm:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: https://registry.npmjs.org/
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-
- run: bun install
- uses: pnpm/action-setup@v4
with:
version: latest
- name: Publish packages to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cat > ~/.npmrc << EOF
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
EOF
publish_if_new() {
local dir=$1
local name=$(node -p "require('./$dir/package.json').name")
local version=$(node -p "require('./$dir/package.json').version")
if npm view "${name}@${version}" version 2>/dev/null; then
echo "${name}@${version} already published, skipping"
else
npm publish "./$dir" --access public
fi
}
publish_if_new packages/core
publish_if_new packages/cli
publish_if_new packages/mcp