Files
Home/codemagic.yaml

46 lines
1.5 KiB
YAML

workflows:
macos-release:
name: Build macOS Release
max_build_duration: 60
instance_type: mac_mini_m2
environment:
groups:
- gitlab_credentials
node: 22.14.0
cache:
cache_paths:
- $HOME/.cargo/registry
- $HOME/.cargo/git
- src-tauri/target
scripts:
- name: Setup Rust toolchain
script: |
if ! command -v cargo &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
- name: Install dependencies
script: |
export PATH="$HOME/.cargo/bin:$PATH"
npm install
- name: Build & Publish macOS Release
script: |
export PATH="$HOME/.cargo/bin:$PATH"
PACKAGE_VERSION=$(node -p "require('./package.json').version")
node release.js --installer --tag="v$PACKAGE_VERSION"
- name: Verify bundled node permissions
script: |
if [ -f "bin/node" ]; then
chmod +x bin/node
xattr -cr bin/node || true
ls -la bin/node
file bin/node
fi
APP_NODE=$(find src-tauri/target/release/bundle -name "node" -path "*bin*" 2>/dev/null | head -1)
if [ -n "$APP_NODE" ]; then
chmod +x "$APP_NODE"
xattr -cr "$APP_NODE" || true
ls -la "$APP_NODE"
fi
artifacts:
- src-tauri/target/release/bundle/dmg/*.dmg
- src-tauri/target/release/bundle/macos/*.app