scratch-desktop/.circleci/config.yml
2020-07-24 17:07:21 -07:00

60 lines
1.6 KiB
YAML

version: 2.1
workflows:
macos:
jobs:
- build_for_macos:
context: code-sign-macOS
windows:
jobs:
- build_for_windows:
context: code-sign-generic
orbs:
windows: circleci/windows@2.2.0
jobs:
build_for_macos:
macos:
xcode: 11.1.0 # last version for which CircleCI uses macOS 10.14.x
steps:
- checkout
- shared_build_steps
- run:
name: Move macOS build products to artifacts directory
command: |
mkdir -p Artifacts/
mv dist/{Scratch*.dmg,mas/Scratch*.pkg} Artifacts/
- store_artifacts:
path: Artifacts/
build_for_windows:
executor:
name: 'windows/default'
shell: "bash.exe"
steps:
- checkout
- shared_build_steps
- run:
name: Move Windows build products to artifacts directory
command: |
mkdir -p Artifacts/
mv dist/{Scratch*.appx,Scratch*.exe} Artifacts/
- store_artifacts:
path: Artifacts/
commands:
shared_build_steps:
description: The build steps which are the same on all platforms. Does not include 'checkout'
steps:
- restore_cache:
keys:
- npm-cache-{{ arch }}-{{ checksum "package-lock.json" }}
- run:
name: Print NPM cache root
command: npm config get cache
- run:
name: Install scratch-desktop dependencies
command: npm ci
- save_cache:
paths:
- node_modules/
key: npm-cache-{{ arch }}-{{ checksum "package-lock.json" }}
- run:
name: Build
command: npm run dist