Skip to content

Commit 7fe8af5

Browse files
authored
Merge pull request #10 from encryptedge/feat/desktop-client
feat/desktop client
2 parents 9035609 + 1671533 commit 7fe8af5

File tree

24 files changed

+3897
-64
lines changed

24 files changed

+3897
-64
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ runs:
1313
node-version: 18
1414
registry-url: https://registry.npmjs.org/
1515

16-
- name: Install dependencies
17-
shell: bash
18-
run: pnpm i
19-
2016
- name: Restore Turborepo Cache
2117
uses: actions/cache@v3
2218
with:

.github/workflows/build-client.yaml

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,31 @@ name: Build and Release Desktop Client
33
on:
44
workflow_dispatch:
55
inputs:
6-
serverip:
7-
default: '0.0.0.0:4000'
6+
server_url:
7+
default: 'http://127.0.0.1:4000'
88
required: false
99
type: string
10-
description: 'Server IP for RCS CTF API Server'
10+
description: 'Server URL (with port) for RCS CTF API Server'
11+
release_version:
12+
default: '0.0.0-dev'
13+
required: false
14+
type: string
15+
description: 'Release version for the client'
16+
release_name:
17+
default: 'local-development'
18+
required: false
19+
type: string
20+
description: 'Release name for the client'
21+
is_pre_release:
22+
default: true
23+
required: false
24+
type: boolean
25+
description: 'Is this a pre-release?'
26+
draft_release:
27+
default: true
28+
required: false
29+
type: boolean
30+
description: 'Do you want to draft?'
1131

1232
permissions:
1333
issues: write
@@ -23,7 +43,7 @@ jobs:
2343
matrix:
2444
platform: [macos-latest, ubuntu-20.04, windows-latest]
2545

26-
runs-on: ubuntu-latest
46+
runs-on: ${{ matrix.platform }}
2747

2848
steps:
2949
- name: Check out code
@@ -33,11 +53,14 @@ jobs:
3353

3454
- name: Setup Environment
3555
uses: ./.github/actions/setup
36-
56+
3757
- name: Copy before build
3858
run: |
39-
cd packages/deployer-url
40-
node entrypoint.js ${{ github.event.inputs.serverip }}
59+
bash bootstrap.sh ${{ github.event.inputs.server_url }}
60+
61+
- name: Install dependencies
62+
shell: bash
63+
run: pnpm i
4164

4265
- name: Build
4366
run: pnpm build:client
@@ -59,10 +82,10 @@ jobs:
5982
env:
6083
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6184
with:
62-
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
63-
releaseName: 'App v__VERSION__'
85+
tagName: ${{ github.event.inputs.release_name }}-v${{ github.event.inputs.release_version }} # the action automatically replaces \_\_VERSION\_\_ with the app version
86+
releaseName: '${{ github.event.inputs.release_name }} v${{ github.event.inputs.release_version }}'
6487
releaseBody: 'See the assets to download this version and install.'
65-
releaseDraft: true
66-
prerelease: false
88+
releaseDraft: ${{ github.event.inputs.draft_release }}
89+
prerelease: ${{ github.event.inputs.is_pre_release }}
6790
projectPath: apps/desktop/src-tauri
68-
distPath: apps/desktop/src
91+
distPath: apps/desktop/dist

.github/workflows/build.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,13 @@ jobs:
2424
- name: Setup Environment
2525
uses: ./.github/actions/setup
2626

27+
- name: Run before install
28+
run: |
29+
bash bootstrap.sh http://127.0.0.1:4000
30+
31+
- name: Install dependencies
32+
shell: bash
33+
run: pnpm i
34+
2735
- name: Install Dependencies
2836
run: pnpm build

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ yarn-error.log*
3939

4040
# Keys
4141
packages/api/keys/jwtRS256.key
42-
packages/api/keys/jwtRS256.key.pub
42+
packages/api/keys/jwtRS256.key.pub
43+
/target

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
{
44
"mode": "auto"
55
}
6+
],
7+
"rust-analyzer.linkedProjects": [
8+
"./apps/desktop/src-tauri/Cargo.toml",
69
]
710
}

0 commit comments

Comments
 (0)