Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.0.0 #104

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
APP_ENVIRONNEMENT=development
// Used to build Nightly or Release app.
BUILD_RELEASE=false
// You don't need these below in your .env. It's exclusively used for signing app for production.
CSC_LINK=
CSC_KEY_PASSWORD=
51 changes: 51 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"env": {
"es2020": true,
"node": true
},
"extends": [
"eslint:recommended",
"preact",
"plugin:@typescript-eslint/recommended",
"airbnb-base",
"airbnb-typescript/base",
"plugin:jsx-a11y/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "jsx-a11y", "react-hooks"],
"ignorePatterns": ["dist", "scripts", "config"],
"rules": {
"no-async-promise-executor": 2,
"no-await-in-loop": 2,
"no-promise-executor-return": 2,
"require-atomic-updates": 2,
"max-nested-callbacks": ["error", 3],
"no-return-await": 2,
"prefer-promise-reject-errors": 2,
"linebreak-style": 0,
"import/extensions": 0,
"@typescript-eslint/await-thenable": 2,
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/no-misused-promises": 2,
"@typescript-eslint/promise-function-async": 2,
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "(useRecoilCallback|useRecoilTransaction_UNSTABLE)"
}
]
},
"settings": {
"import/core-modules": ["electron"]
}
}
55 changes: 55 additions & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Colorpicker Nightly

on:
pull_request:
branches:
- dev
types: [closed]

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: apt-get update on Ubuntu
run: sudo apt-get update
if: matrix.os == 'ubuntu-latest'

- name: install dependencies
run: yarn install --frozen-lockfile

- name: build Colorpicker Nightly
run: npm run release
env:
APP_ENVIRONNEMENT: production

- name: create artifacts folder
run: mkdir artifacts

- name: move Linux build artifacts
run: mv release/*.deb release/*.AppImage release/*.freebsd release/*.tar.gz ./artifacts
if: matrix.os == 'ubuntu-latest'

- name: move Macos build artifacts
run: mv release/*.dmg ./artifacts
if: matrix.os == 'macos-latest'

- name: move Windows build artifacts
run: move release\*.exe, release\*.msi -Destination artifacts
if: matrix.os == 'windows-latest'

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: artifacts
56 changes: 56 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Colorpicker

on:
pull_request:
branches:
- dev
types: [closed]

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: apt-get update on Ubuntu
run: sudo apt-get update
if: matrix.os == 'ubuntu-latest'

- name: install dependencies
run: yarn install --frozen-lockfile

- name: build Colorpicker Nightly
run: npm run release
env:
APP_ENVIRONNEMENT: production
BUILD_RELEASE: true

- name: create artifacts folder
run: mkdir artifacts

- name: move Linux build artifacts
run: mv release/*.deb release/*.AppImage release/*.freebsd release/*.tar.gz ./artifacts
if: matrix.os == 'ubuntu-latest'

- name: move Macos build artifacts
run: mv release/*.dmg ./artifacts
if: matrix.os == 'macos-latest'

- name: move Windows build artifacts
run: move release\*.exe, release\*.msi -Destination artifacts
if: matrix.os == 'windows-latest'

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: artifacts
40 changes: 40 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run tests

on: [pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: apt-get update on Ubuntu
run: sudo apt-get update
if: matrix.os == 'ubuntu-latest'

- name: install dependencies
run: yarn install --frozen-lockfile
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1

- name: install playwright
run: yarn playwright install --with-deps chromium

- name: linting
run: yarn lint

- name: run tests on linux
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test
if: matrix.os == 'ubuntu-latest'

- name: run tests
run: yarn test
if: matrix.os != 'ubuntu-latest'
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
node_modules/
out/
parts/
stage/
prime/
snap/.snapcraft
*.snap
/node_modules
/dist
/release
.vscode

*.log
*.p12
.env
6 changes: 0 additions & 6 deletions .npmrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 100,
"singleQuote": true,
"tabWidth": 2,
"semi": true,
"endOfLine": "lf",
"trailingComma": "all"
}
Loading