Skip to content

debug: release wf

debug: release wf #87

Workflow file for this run

name: Release
on:
push:
branches:
- feat.windows.support
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g., v0.0.6)'
required: true
type: string
jobs:
build:
name: Build ${{ matrix.os == 'macos' && 'macOS' || 'Windows' }} (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: macos
arch: arm64
runner: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Verify architecture
if: matrix.os == 'macos'
run: |
CURRENT_ARCH=$(uname -m)
echo "Current shell architecture: $CURRENT_ARCH"
echo "Target architecture: ${{ matrix.arch }}"
echo "Arch command output: $(arch)"
if [[ "${{ matrix.arch }}" == "x64" ]]; then
if [[ "$CURRENT_ARCH" != "x86_64" ]]; then
echo "ERROR: Expected x86_64 architecture but got $CURRENT_ARCH"
exit 1
fi
echo "✓ Architecture verified: Running as native x86_64 on Intel hardware"
elif [[ "${{ matrix.arch }}" == "arm64" ]]; then
if [[ "$CURRENT_ARCH" != "arm64" ]]; then
echo "ERROR: Expected arm64 architecture but got $CURRENT_ARCH"
exit 1
fi
echo "✓ Architecture verified: Running as native arm64"
fi
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.15.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'pnpm'
- name: Log Node.js architecture and platform
run: |
echo "=== Node.js Process Information ==="
node -e "console.log('process.arch:', process.arch)"
node -e "console.log('process.platform:', process.platform)"
echo ""
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download Node.js binaries
working-directory: apps/desktop
run: pnpm download-node
- name: Import Developer ID cert
if: matrix.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.DEVELOPER_CERT_BASE64 }}
p12-password: ${{ secrets.DEVELOPER_CERT_PASSPHRASE }}
- name: List signing identities (debug)
if: matrix.os == 'macos'
run: security find-identity -v -p codesigning
- name: Build artifacts (macOS)
if: matrix.os == 'macos'
working-directory: apps/desktop
env:
SKIP_CODESIGNING: true
SKIP_NOTARIZATION: true
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CODESIGNING_IDENTITY: ${{ secrets.CODESIGNING_IDENTITY }}
run: |
echo "Building macOS ${{ matrix.arch }} artifacts"
pnpm make:${{ matrix.arch }}
- name: Build artifacts (Windows)
if: matrix.os == 'windows'
working-directory: apps/desktop
run: |
echo "Building Windows x64 artifacts"
pnpm make:windows
- name: Display symlink debug log
if: always()
working-directory: apps/desktop
run: |
echo "=== Symlink Debug Log ==="
if [ -f symlink-debug.log ]; then
cat symlink-debug.log
else
echo "No symlink-debug.log file found"
fi
- name: Get version from package.json
id: package_version
working-directory: apps/desktop
shell: bash
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Upload artifacts (macOS)
if: matrix.os == 'macos'
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.arch }}
path: |
apps/desktop/out/make/*-${{ matrix.arch }}.dmg
apps/desktop/out/make/zip/darwin/${{ matrix.arch }}/*.zip
- name: Upload artifacts (Windows)
if: matrix.os == 'windows'
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.arch }}
path: |
apps/desktop/out/make/squirrel.windows/${{ matrix.arch }}/*.exe
apps/desktop/out/make/squirrel.windows/${{ matrix.arch }}/*.nupkg
- name: Upload debug logs
if: always()
uses: actions/upload-artifact@v4
with:
name: debug-logs-${{ matrix.os }}-${{ matrix.arch }}
path: |
apps/desktop/symlink-debug.log
if-no-files-found: ignore