Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasSchweigler authored Jan 4, 2024
2 parents 0fac0ba + 7fe8af5 commit f2a5234
Show file tree
Hide file tree
Showing 49 changed files with 16,241 additions and 7,353 deletions.
25 changes: 25 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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: 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 }}
91 changes: 91 additions & 0 deletions .github/workflows/build-client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Build and Release Desktop Client

on:
workflow_dispatch:
inputs:
server_url:
default: 'http://127.0.0.1:4000'
required: false
type: string
description: 'Server URL (with port) for RCS CTF API Server'
release_version:
default: '0.0.0-dev'
required: false
type: string
description: 'Release version for the client'
release_name:
default: 'local-development'
required: false
type: string
description: 'Release name for the client'
is_pre_release:
default: true
required: false
type: boolean
description: 'Is this a pre-release?'
draft_release:
default: true
required: false
type: boolean
description: 'Do you want to draft?'

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: ${{ matrix.platform }}

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: |
bash bootstrap.sh ${{ github.event.inputs.server_url }}
- name: Install dependencies
shell: bash
run: pnpm i

- 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: ${{ github.event.inputs.release_name }}-v${{ github.event.inputs.release_version }} # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: '${{ github.event.inputs.release_name }} v${{ github.event.inputs.release_version }}'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: ${{ github.event.inputs.draft_release }}
prerelease: ${{ github.event.inputs.is_pre_release }}
projectPath: apps/desktop/src-tauri
distPath: apps/desktop/dist
22 changes: 12 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ jobs:
with:
fetch-depth: 2

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

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

- name: Run before install
run: |
bash bootstrap.sh http://127.0.0.1:4000
- name: Install dependencies
run: yarn

- name: Build
run: yarn build
shell: bash
run: pnpm i

- 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: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ yarn-error.log*

# Keys
packages/api/keys/jwtRS256.key
packages/api/keys/jwtRS256.key.pub
packages/api/keys/jwtRS256.key.pub
/target
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"]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
{
"mode": "auto"
}
],
"rust-analyzer.linkedProjects": [
"./apps/desktop/src-tauri/Cargo.toml",
]
}
Loading

0 comments on commit f2a5234

Please sign in to comment.