-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add access key * feat: save generated access key to vault and set cookies * chore: rename isVaultReadyStore to isAppReadyStore * feat: add access key page * feat: check access key on every request * chore: general cleanup * fix: remove URL protocol override * chore: more syntax cleanup * chore: remove unused store props * feat: add status bar notification after setting access key * test: fix sync tests * test: increase visual diff ratio * chore: remove unused imports * fix: skip checks when /devTools is requested in dev and tests * fix: update environment variables for tests * test: add accessKey tests * test: add more tests * test: add test for /vault * test: add more assertions * fix: cleanup redundant syntax * fix: update Linux Prisma engines * test: add statusBar assertion * test: add statusBar assertion on reset * test: reset access key before continuing * test: improve assertion resilience * chore: rename helpers/test.server.ts * test: don't reload, go to /devTools * test: add TEST_ACCESS_KEY check * docs: add comment * feat: add server only release (#153) * chore: remove unused script svelte-kit package has been removed. It now lives in its own npm package. See the PR on how to migrate: sveltejs/kit#5730 * feat: add Linux server release * feat: remove builds for all except ubuntu This is a test for building and releasing a Linux server version of Canutin * Revert "feat: remove builds for all except ubuntu" This reverts commit 01481ba. * fix: get previous tag * fix: rename ELECTRON_SWITCHED_VAULT to SHOULD_CHECK_VAULT * fix: replace semantic-release package with GH action * fix: add Linux server package script * fix: typo
- Loading branch information
Showing
40 changed files
with
9,686 additions
and
17,591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,28 +17,57 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
|
||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: cycjimmy/semantic-release-action@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Only continue with these steps if the commit is tagged | ||
|
||
- name: Install Electron dependencies | ||
if: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
run: npm ci | ||
|
||
- name: Install SvelteKit dependencies | ||
if: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
working-directory: ./sveltekit | ||
run: npm ci | ||
|
||
- name: Install Prisma's dependencies | ||
if: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
working-directory: ./sveltekit | ||
run: npx prisma generate | ||
|
||
- name: Install Electron dependencies | ||
run: npm ci | ||
- name: "Generate Sveltekit build" | ||
if: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
run: npm run build:sveltekit | ||
|
||
- name: Run semantic release | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Prepare package.json for release | ||
- name: Update package.json's with app version | ||
if: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
run: npm run package:github | ||
env: | ||
APP_VERSION: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
|
||
- name: Build & release Electron app | ||
if: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
uses: samuelmeuli/[email protected] | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
build_script_name: "build:all" | ||
build_script_name: "build:electron" | ||
release: true | ||
|
||
- name: Package Linux server | ||
# - Needs to run after the Electron build because it relies on the files and directories created in that step. | ||
# - Only create a release for the Linux server when action runs in Ubuntu. | ||
if: ${{ matrix.os == 'ubuntu-latest' && steps.tag_version.outputs.new_release_git_tag }} | ||
run: npm run package:linux-server | ||
env: | ||
APP_VERSION: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
|
||
- name: Release Linux server | ||
if: ${{ matrix.os == 'ubuntu-latest' && steps.tag_version.outputs.new_release_git_tag }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.tag_version.outputs.new_release_git_tag }} | ||
files: ./dist/canutin-server_*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
HOST="localhost" | ||
PORT="42069" | ||
DATABASE_URL="file:../Canutin.vault" | ||
SHOULD_CHECK_VAULT="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Canutin: server | ||
|
||
## Setting up the server | ||
|
||
1. Download the [latest version](https://github.com/Canutin/desktop/releases) of **Canutin server** for Linux and extract it to a folder. | ||
2. Install [Node.js](https://nodejs.org/) (v18+) if you don't have it already. | ||
|
||
```bash | ||
sudo apt-get install nodejs | ||
``` | ||
|
||
3. Edit the `.env` file to set the vault `path`, `hostname` and `port`. | ||
4. Run the server with `./start` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
echo " | ||
..,;:;,.. | ||
.':lkKNWWWNKxc. | ||
.'oKNWNkoccld0WWO;. | ||
.'oKWWW0:. ..oXM0, | ||
.'oKWMMXOc. .kWNl. | ||
.'oKWMMMMNKl. 'OMNc. | ||
.'oKWMMMMMMMWKo'. ..;kWWx. | ||
.'oKWMMMMMMMMMMMWXkxdx0NWKl. | ||
.:0WMMMMMMMMMMMMMMMMMMMWKo'. | ||
;KMMMMMMMMMMMMMMMMMMMWKo'. | ||
.oNMMMMMMMMMMMMMMMMMWKo'. | ||
.cXMMMMMMMMMMMMMMMWKo'. | ||
.dNMMMMMMMMMMMWNKo'. | ||
.cONMMMMMMMN0o:'. | ||
.;ldkkkxo:.. | ||
... | ||
" | ||
|
||
echo "-> Loading environment variables from `.env` file" | ||
export $(xargs <.env) | ||
|
||
echo "----> HOST: $HOST" | ||
echo "----> PORT: $PORT" | ||
echo "----> DATABASE_URL: $DATABASE_URL" | ||
echo "----> SHOULD_CHECK_VAULT: $SHOULD_CHECK_VAULT" | ||
|
||
echo "" | ||
echo "-> Starting server" | ||
node index.js |
Oops, something went wrong.