Skip to content

Commit

Permalink
build: Icons and CI cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kaulsh committed Sep 18, 2022
1 parent dcc089f commit aa33272
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 57 deletions.
87 changes: 39 additions & 48 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
version: 2.1

jobs:
build_linux:

build:
docker:
- image: node:16
steps:
Expand All @@ -10,76 +11,66 @@ jobs:
name: "Install dependencies"
command: "npm ci"
- run:
name: "Build electron & react"
name: "Build processes"
command: "npm run build"
- run:
name: "Build AppImage"
command: "npm run dist:app_image"
- run:
name: "Build deb"
command: "npm run dist:deb"
- run:
name: "Move necessary build output"
command: "mkdir -p /tmp/release && mv ./release/*.AppImage ./release/*.deb /tmp/release"
- store_artifacts:
path: /tmp/release
name: "Move build assets"
command: "mkdir -p /tmp/release && mv node_modules build package.json /tmp/release"
- persist_to_workspace:
root: /tmp/release
paths:
- '*.AppImage'
- '*.deb'
- build
- node_modules
- package.json

build_macos:
macos:
xcode: 13.4.1
publish_linux:
docker:
- image: node:16
working_directory: /tmp/release
steps:
- checkout
- run:
name: "Install dependencies"
command: "npm ci && npm i dmg-license"
- run:
name: "Build electron & react"
command: "npm run build"
- attach_workspace:
at: /tmp/release
- run:
name: "Build dmg"
command: "npm run dist:macos_dmg"
no_output_timeout: 30m
name: "Install extra linux dependencies"
command: apt-get update && apt-get install rpm -y
- run:
name: "Move necessary build output"
command: "mkdir -p /tmp/release && mv ./release/*.dmg /tmp/release"
- store_artifacts:
path: /tmp/release
- persist_to_workspace:
root: /tmp/release
name: "Build distributable"
command: "npm run dist:linux"

publish-github-release:
docker:
- image: cibuilds/github:0.10
publish_macos:
macos:
xcode: 13.4.1
working_directory: /tmp/release
steps:
- attach_workspace:
at: /tmp/release
- run:
name: "Publish Release on GitHub"
command: ghr -t ${GH_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} /tmp/release
name: "Install dmg-license"
command: "npm i dmg-license"
- run:
name: "Build distributable"
command: "npm run dist:macos"
no_output_timeout: 30m

workflows:
main:
jobs:
- build_linux:
- build
- publish_linux:
requires:
- 'build'
filters:
branches:
ignore: /.*/
tags:
only:
- /^\d+\.\d+\.\d+$/
- publish-github-release:
branches:
ignore: /.*/
tags:
only:
- /^\d+\.\d+\.\d+$/
- publish_macos:
requires:
- build_linux
- 'build'
filters:
branches:
ignore: /.*/
tags:
only:
- /^\d+\.\d+\.\d+$/
# @todo: figure out how to test macos dmg files
# - build_macos
27 changes: 18 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"homepage": "./",
"main": "./build/renderer/electron/main.js",
"repository": "github:makeark/ark",
"scripts": {
"start": "BROWSER=none ARK_ENTRY_URL=http://localhost:5173 concurrently \"vite\" \"sleep 2 && electron .\"",
"dev:electron": "tsc --build electron/tsconfig.json -w",
Expand All @@ -14,15 +15,17 @@
"build:renderer": "vite build",
"build:main": "tsc --build electron/tsconfig.json",
"build": "rimraf build && npm run build:renderer && npm run build:main",
"dist:app_image": "electron-builder --linux",
"dist:deb": "electron-builder --linux deb",
"dist:macos_dmg": "electron-builder --macos",
"dist:macos_deb": "echo 'Not supported for now'",
"dist:linux": "electron-builder --linux",
"dist:macos": "electron-builder --macos",
"dist:windows": "electron-builder --windows",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"prepare": "husky install"
},
"author": {
"email": "[email protected]",
"name": "Shashank Kaul"
},
"browser": "none",
"browserslist": {
"production": [
Expand All @@ -48,16 +51,19 @@
"to": "build/mongoshell.d.ts"
}
],
"extraResources": [
"./node_modules/**/*"
"publish": [
{
"provider": "github",
"vPrefixedTagName": false,
"publishAutoUpdate": true
}
],
"publish": null,
"npmArgs": [
"--ignore-scripts"
],
"directories": {
"output": "release",
"buildResources": "resources",
"buildResources": "src/assets",
"app": "./"
},
"mac": {
Expand All @@ -84,9 +90,12 @@
},
"linux": {
"target": [
"deb",
"rpm",
"AppImage"
],
"category": "Development"
"category": "Development",
"icon": "src/assets/icon.png"
}
},
"devDependencies": {
Expand Down
Binary file added src/assets/icon.icns
Binary file not shown.
Binary file modified src/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aa33272

Please sign in to comment.