Files
picoclaw/.github/workflows/create_dmg.yml
T
wenjie f82fe5a2ec ci: use pnpm/action-setup and sync README install steps (#2512)
* ci(workflows): use pnpm/action-setup in build and release pipelines

Replace the corepack-based pnpm setup with pnpm/action-setup
and pin pnpm to v10.33.0 in the create_dmg, nightly, and
release GitHub Actions workflows.

* docs(readme): update pnpm setup instructions across translated READMEs
2026-04-14 10:44:47 +08:00

72 lines
1.9 KiB
YAML

name: Create macOS DMG
on:
workflow_dispatch:
jobs:
build:
name: Build ${{ matrix.arch }}
runs-on: macos-latest
strategy:
matrix:
# This creates two parallel jobs
arch: [arm64, amd64]
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: main
# 1. Install Go from go.mod
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.33.0
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
cache-dependency-path: web/frontend/pnpm-lock.yaml
# 3. Build the application bundle
- name: Build with Make
run: make build ARCH=${{ matrix.arch }} && make build-macos-app ARCH=${{ matrix.arch }}
# 4. Apply ad-hoc signing
- name: Ad-hoc Sign
run: codesign --force --deep --sign - "build/PicoClaw Launcher.app"
# 5. Install the DMG packaging tool
- name: Install create-dmg
run: brew install create-dmg
# 6. Create the DMG
- name: Create DMG
run: |
mkdir -p dist
create-dmg \
--volname "PicoClaw Installer" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "PicoClaw Launcher.app" 200 190 \
--hide-extension "PicoClaw Launcher.app" \
--app-drop-link 600 185 \
"dist/picoclaw-${{ matrix.arch }}.dmg" \
"build/PicoClaw Launcher.app"
# 7. Upload the DMG as a GitHub artifact
- name: Upload DMG
uses: actions/upload-artifact@v7
with:
name: macos-dmg-${{ matrix.arch }}
path: dist/*.dmg