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

[WIP]: Replace Electron with Tauri #2

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
65 changes: 65 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Twincy App.

on:
push:
branches: [ tauri-migration ]
pull_request:
branches: [ tauri-migration ]

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Setup Rust cache
uses: actions/cache@v2
with:
key: ${{ matrix.os }}-${{ hashFiles('packages/admin/src-tauri/Cargo.lock') }}
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
./packages/admin/src-tauri/target
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
cache-dependency-path: |
package-lock.json
- name: 🦀 Install Rust
uses: actions-rs/toolchain@v1
with: { toolchain: stable }

- name: Install webkit2gtk (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get upgrade -y --no-install-recommends webkit2gtk-4.0
- name: Install Node.js dependencies
run: npm install

- name: Download Rust dependencies
run: cargo fetch --manifest-path=packages/admin/src-tauri/Cargo.toml

- name: Build application
run: npm run build:tauri

- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-${{ matrix.os }}
path: |
packages/admin/src-tauri/target/release/bundle
packages/admin/src-tauri/target/release/twincy-admin*
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ See all chat messages and click one to feature it on the stream.
!q <question> // Automatically highlights the message

## Development instructions
* Run `npm start` on the console while being in this directory
* Install dependencies: `npm install` in the root directory
* Run app in dev mode:
- Browser: `npm run dev`
- Desktop: in separate terminals execute `npm run dev` and `npm run dev:tauri`

## Standalone app
The standalone app is not yet distributed, but if you want to build it, go inside the `electron` folder and run `npm run make`, it will generate an `out` directory with the `.exe` inside.

## Build standalone app
From the root directory you can execute the command `npm run build:tauri` to generate the desktop app for the OS you are running the app from, this will generate several files in the folder `./packages/admin/src-tauri/target/release` including the `twincy-admin.exe` in the case of Windows

---
Follow me on [Twitter](https://twitter.gonzalopozzo.com), on [Twitch](https://twitch.gonzalopozzo.com) and doname un [Cafecito](https://cafecito.gonzalopozzo.com) ✨
42 changes: 0 additions & 42 deletions electron/.compilerc

This file was deleted.

1 change: 0 additions & 1 deletion electron/.env.development

This file was deleted.

1 change: 0 additions & 1 deletion electron/.env.production

This file was deleted.

16 changes: 0 additions & 16 deletions electron/.eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion electron/.gitignore

This file was deleted.

Loading