* desktop: add support for publishing to mac app store
* ci: add step for deployment to testflight
* ci: temporarily run build only on macos
* config: cache `build:desktop` output in nx
* ci: use `macos-12` instead of `macos-latest`
* ci: no need to install `jq`
* ci: build & deploy manually
* ci: set env_vars using `env` key
* ci: install packages before building
* ci: build electron bundle before deployment
* ci: install distribution signing cert
* web: disable app store offending stuff for macos
* ci: enable deployment to testflight
* ci: remove cert installation to keychain
* desktop: pass entitlement files through plutil
* ci: use a single cert for everything
* ci: fix altool command for uploading macOS package
* ci: use env_vars for apiKey & apiIssuer
* ci: install provisionprofile
* ci: install provisioning profile in `./apps/web/desktop` dir
* desktop: change bundleId to `org.streetwriters.notesnook`
* ci: deploy & build in separate steps
* ci: add jobs for linux & windows releasing
* ci: checkout repo before anything else
* ci: add `GH_TOKEN` to env & use ps syntax on windows
* ci: get app store versions only for mac app
* ci: correct order of steps
Co-authored-by: ammarahm-ed <ammarahmed6506@gmail.com>
This is mainly done via sharding, caching & reducing total work:
1. `terser` is turned off when generating test build
2. `nx` distributed cache allows reusing build outputs
3. `playwright` sharding allows running tests in parallel
This can further be improved by using `swc` & `esbuild` during build
**Why?**
The old test suite was a confusing mess, hard to maintain, update, and
add more tests to. It lacked a much needed layer of expressivity &
the reusable functions were all over the place.
Since it used a global `page` (by mistake), it couldn't run in parallel.
Moreover, the global `page` approach caused random flakiness.
All the above reasons led to this OM (Object Model) based approach to tests.
The tests are now much more expressive, reslient, resuable & easier to
maintain. During the rewriting process I also added a couple more
tests (about 10) so this is a net improvement.
Previously, running the tests were also quite slow (15-25s avg). This has
now been improved to (5-8s avg) by running the tests in production.
This means the app now requires to be built before running the tests:
```sh
npm run build:test:web # this is only required once
npm run test:web
```