Skip to content

Commit

Permalink
Merge pull request #9 from encryptedge/feat/desktop-client
Browse files Browse the repository at this point in the history
Feat/desktop client
  • Loading branch information
BRAVO68WEB authored Jan 4, 2024
2 parents 071cbbe + fe84791 commit 9035609
Show file tree
Hide file tree
Showing 43 changed files with 12,390 additions and 7,331 deletions.
29 changes: 29 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Setup Node Environment
description: Prepare and install everything for nodejs repo

runs:
using: composite
steps:
- uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install dependencies
shell: bash
run: pnpm i

- name: Restore Turborepo Cache
uses: actions/cache@v3
with:
path: |
apps/**/.turbo
packages/**/.turbo
node_modules/.cache/turbo
key: turbo-${{ runner.os }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-${{ github.job }}
68 changes: 68 additions & 0 deletions .github/workflows/build-client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and Release Desktop Client

on:
workflow_dispatch:
inputs:
serverip:
default: '0.0.0.0:4000'
required: false
type: string
description: 'Server IP for RCS CTF API Server'

permissions:
issues: write
repository-projects: read
contents: write

jobs:
buildapp:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Environment
uses: ./.github/actions/setup

- name: Copy before build
run: |
cd packages/deployer-url
node entrypoint.js ${{ github.event.inputs.serverip }}
- name: Build
run: pnpm build:client

- name: Copy before release
run: |
bash ./scripts/build-client.sh
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
projectPath: apps/desktop/src-tauri
distPath: apps/desktop/src
16 changes: 5 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ jobs:
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Install dependencies
run: yarn

- name: Build
run: yarn build
- name: Setup Environment
uses: ./.github/actions/setup

- name: Install Dependencies
run: pnpm build
14 changes: 7 additions & 7 deletions .github/workflows/todo.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Create issues from TODOs

on:
workflow_dispatch:
inputs:
importAll:
default: 'false'
required: false
type: boolean
description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing.
# workflow_dispatch:
# inputs:
# importAll:
# default: false
# required: false
# type: boolean
# description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing.
push:

permissions:
Expand Down
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
25 changes: 25 additions & 0 deletions apps/desktop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
src
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
7 changes: 7 additions & 0 deletions apps/desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Tauri + Vanilla

This template should help get you started developing with Tauri in vanilla HTML, CSS and Javascript.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
13 changes: 13 additions & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "eectf-desktop-client",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "tauri dev",
"tauri": "tauri"
},
"devDependencies": {
"@tauri-apps/cli": "^1.5.8"
}
}
4 changes: 4 additions & 0 deletions apps/desktop/src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
/target/

Loading

0 comments on commit 9035609

Please sign in to comment.