From 4c70dce568f35c17d2cb047110bbda6a58a2d6a3 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:07:20 +0600 Subject: [PATCH 01/24] build --- .gitea/workflows/deploy-client.yml | 37 ++++++++++----------------- client/{Dockerfile => Dockerfile.web} | 0 client/Dockerfile.windows | 32 +++++++++++++++++++++++ 3 files changed, 45 insertions(+), 24 deletions(-) rename client/{Dockerfile => Dockerfile.web} (100%) create mode 100644 client/Dockerfile.windows diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index c90770b..c4d8004 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -27,7 +27,7 @@ jobs: persist-credentials: false - name: Build - run: docker build -t chad-client ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} + run: docker build -t chad-client -f Dockerfile.web ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} - name: Stop old container run: docker rm -f chad-client || true @@ -45,30 +45,19 @@ jobs: chad-client:latest publish-tauri: - runs-on: windows-latest + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 + - name: Keyscan + run: | + ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts - - name: setup node - uses: actions/setup-node@v4 + - name: Checkout + uses: actions/checkout@v4 with: - node-version: lts/* + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + ssh-strict: false + persist-credentials: false - - name: install Rust stable - uses: dtolnay/rust-toolchain@stable - - - name: install frontend dependencies - run: yarn install - - - uses: tauri-apps/tauri-action@v1 - env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} - with: - tagName: app-v__VERSION__ - releaseName: "App v__VERSION__" - releaseBody: "See the assets to download this version and install." - releaseDraft: true - projectPath: "./client" - githubBaseUrl: "https://git.koptilnya.xyz/api/v1" - isGitea: true - prerelease: false + - name: Build + run: docker build -t chad-client -f Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} diff --git a/client/Dockerfile b/client/Dockerfile.web similarity index 100% rename from client/Dockerfile rename to client/Dockerfile.web diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows new file mode 100644 index 0000000..5059060 --- /dev/null +++ b/client/Dockerfile.windows @@ -0,0 +1,32 @@ +FROM ubuntu:latest + +WORKDIR /app + +RUN corepack enable +RUN yarn set version stable + +COPY package.json yarn.lock .yarnrc.yml ./ + +RUN yarn install +COPY . . + +ARG COMMIT_SHA=unknown +ARG API_BASE_URL + +ENV COMMIT_SHA=$COMMIT_SHA \ + API_BASE_URL=$API_BASE_URL + +RUN apt update && apt install -y \ + nsis \ + lld \ + llvm + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + +RUN rustup target add x86_64-pc-windows-msvc + +RUN cargo install --locked cargo-xwin + +RUN yarn tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc + +RUN ls -la -- 2.49.1 From 8d02eb380d7dae6dcd783c50559c9a098c901df9 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:17:29 +0600 Subject: [PATCH 02/24] update --- .gitea/workflows/deploy-client.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index c4d8004..71c35f4 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -27,7 +27,7 @@ jobs: persist-credentials: false - name: Build - run: docker build -t chad-client -f Dockerfile.web ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} + run: docker build -t chad-client -f ./client/Dockerfile.web ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} - name: Stop old container run: docker rm -f chad-client || true @@ -60,4 +60,4 @@ jobs: persist-credentials: false - name: Build - run: docker build -t chad-client -f Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} + run: docker build -t chad-client -f ./client/Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} -- 2.49.1 From ddc43e4b4208a6f62629c17928b1b50bfcb4a1e4 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:36:12 +0600 Subject: [PATCH 03/24] update --- .gitea/workflows/deploy-client.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index 71c35f4..947f3bd 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -6,6 +6,7 @@ on: - release # tags: # - "v[0-9]+.[0-9]+.[0-9]+" + # paths: - ".gitea/workflows/deploy-client.yml" - "client/**" -- 2.49.1 From 472fa8d907eef54565052170a6a1ba3fe07f8dae Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:40:38 +0600 Subject: [PATCH 04/24] update --- client/Dockerfile.windows | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 5059060..d523df2 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -2,7 +2,11 @@ FROM ubuntu:latest WORKDIR /app -RUN corepack enable +RUN curl -o- https://fnm.vercel.app/install | bash + +RUN fnm install 24 + +RUN corepack enable yarn RUN yarn set version stable COPY package.json yarn.lock .yarnrc.yml ./ -- 2.49.1 From e8cbf6e1461c49551401398e76232d682762890a Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:44:36 +0600 Subject: [PATCH 05/24] update --- client/Dockerfile.windows | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index d523df2..3523f08 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -2,6 +2,10 @@ FROM ubuntu:latest WORKDIR /app +RUN apt update + +RUN apt install curl + RUN curl -o- https://fnm.vercel.app/install | bash RUN fnm install 24 -- 2.49.1 From b05a7324d68b0d23517a6763cb8cc72d2a8dd3c5 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:45:17 +0600 Subject: [PATCH 06/24] update --- client/Dockerfile.windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 3523f08..2fd555e 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -4,7 +4,7 @@ WORKDIR /app RUN apt update -RUN apt install curl +RUN apt install -y curl RUN curl -o- https://fnm.vercel.app/install | bash -- 2.49.1 From c665c19cf31613180fc7ac1b8bb6df200b9dc0a8 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:47:24 +0600 Subject: [PATCH 07/24] update --- client/Dockerfile.windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 2fd555e..663bb23 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -4,7 +4,7 @@ WORKDIR /app RUN apt update -RUN apt install -y curl +RUN apt install -y curl unzip RUN curl -o- https://fnm.vercel.app/install | bash -- 2.49.1 From 40d66d356bb10796ec734c2a3147351b1b7821e3 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:50:33 +0600 Subject: [PATCH 08/24] update --- .gitea/workflows/deploy-client.yml | 36 +++++++++++++++--------------- client/Dockerfile.windows | 2 ++ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index 947f3bd..ecbb8a7 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -12,6 +12,24 @@ on: - "client/**" jobs: + publish-tauri: + runs-on: ubuntu-latest + + steps: + - name: Keyscan + run: | + ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts + + - name: Checkout + uses: actions/checkout@v4 + with: + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + ssh-strict: false + persist-credentials: false + + - name: Build + run: docker build -t chad-client -f ./client/Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} + publish-web: runs-on: ubuntu-latest @@ -44,21 +62,3 @@ jobs: --label "traefik.http.routers.chad-client.tls.certresolver=myresolver" \ --label "traefik.http.services.chad-client.loadbalancer.server.port=80" \ chad-client:latest - - publish-tauri: - runs-on: ubuntu-latest - - steps: - - name: Keyscan - run: | - ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts - - - name: Checkout - uses: actions/checkout@v4 - with: - ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - ssh-strict: false - persist-credentials: false - - - name: Build - run: docker build -t chad-client -f ./client/Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 663bb23..5939154 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -8,6 +8,8 @@ RUN apt install -y curl unzip RUN curl -o- https://fnm.vercel.app/install | bash +RUN source /root/.bashrc + RUN fnm install 24 RUN corepack enable yarn -- 2.49.1 From 6b5d669f644ef18639a85bef4a3c10a591bccd90 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 21:55:12 +0600 Subject: [PATCH 09/24] update --- .gitea/workflows/deploy-client.yml | 58 +++++++++++++++--------------- client/Dockerfile.windows | 4 +-- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index ecbb8a7..d651b30 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -12,7 +12,7 @@ on: - "client/**" jobs: - publish-tauri: + publish-windows: runs-on: ubuntu-latest steps: @@ -28,37 +28,37 @@ jobs: persist-credentials: false - name: Build - run: docker build -t chad-client -f ./client/Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} + run: docker build -t chad-client-windows -f ./client/Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} - publish-web: - runs-on: ubuntu-latest + # publish-web: + # runs-on: ubuntu-latest - steps: - - name: Keyscan - run: | - ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts + # steps: + # - name: Keyscan + # run: | + # ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts - - name: Checkout - uses: actions/checkout@v4 - with: - ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - ssh-strict: false - persist-credentials: false + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + # ssh-strict: false + # persist-credentials: false - - name: Build - run: docker build -t chad-client -f ./client/Dockerfile.web ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} + # - name: Build + # run: docker build -t chad-client -f ./client/Dockerfile.web ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} - - name: Stop old container - run: docker rm -f chad-client || true + # - name: Stop old container + # run: docker rm -f chad-client || true - - name: Run - run: | - docker run -d \ - --name chad-client \ - --network traefik \ - --label "traefik.enable=true" \ - --label "traefik.http.routers.chad-client.rule=Host(\`chad.koptilnya.xyz\`)" \ - --label "traefik.http.routers.chad-client.entrypoints=websecure" \ - --label "traefik.http.routers.chad-client.tls.certresolver=myresolver" \ - --label "traefik.http.services.chad-client.loadbalancer.server.port=80" \ - chad-client:latest + # - name: Run + # run: | + # docker run -d \ + # --name chad-client \ + # --network traefik \ + # --label "traefik.enable=true" \ + # --label "traefik.http.routers.chad-client.rule=Host(\`chad.koptilnya.xyz\`)" \ + # --label "traefik.http.routers.chad-client.entrypoints=websecure" \ + # --label "traefik.http.routers.chad-client.tls.certresolver=myresolver" \ + # --label "traefik.http.services.chad-client.loadbalancer.server.port=80" \ + # chad-client:latest diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 5939154..20cf359 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -8,9 +8,7 @@ RUN apt install -y curl unzip RUN curl -o- https://fnm.vercel.app/install | bash -RUN source /root/.bashrc - -RUN fnm install 24 +RUN ~/.local/share/fnm/fnm install 24 RUN corepack enable yarn RUN yarn set version stable -- 2.49.1 From 6b5383ba24b95c7978d989a40e4b2923ec421125 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:01:30 +0600 Subject: [PATCH 10/24] Update Dockerfile.windows --- client/Dockerfile.windows | 1 + 1 file changed, 1 insertion(+) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 20cf359..c1ff713 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -9,6 +9,7 @@ RUN apt install -y curl unzip RUN curl -o- https://fnm.vercel.app/install | bash RUN ~/.local/share/fnm/fnm install 24 +RUN ~/.local/share/fnm/fnm use 24 RUN corepack enable yarn RUN yarn set version stable -- 2.49.1 From 10bfcf07273b46b536f7963083427796fcaf13d0 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:14:24 +0600 Subject: [PATCH 11/24] Update Dockerfile.windows --- client/Dockerfile.windows | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index c1ff713..b867b19 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -1,15 +1,17 @@ -FROM ubuntu:latest +FROM node:lts + +# SHELL ["/bin/bash", "-c"] WORKDIR /app -RUN apt update +# RUN apt update +# +# RUN apt install -y curl unzip -RUN apt install -y curl unzip +# RUN curl -fsSL https://fnm.vercel.app/install | bash -RUN curl -o- https://fnm.vercel.app/install | bash - -RUN ~/.local/share/fnm/fnm install 24 -RUN ~/.local/share/fnm/fnm use 24 +# RUN ~/.local/share/fnm/fnm install 24 +# RUN ~/.local/share/fnm/fnm use 24 RUN corepack enable yarn RUN yarn set version stable -- 2.49.1 From 3f581ea8e99d6b02b092b1384c6c3424f61ea8e1 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:15:37 +0600 Subject: [PATCH 12/24] Update deploy-client.yml --- .gitea/workflows/deploy-client.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index d651b30..6ca7ae5 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -2,8 +2,8 @@ name: Deploy on: push: - branches: - - release + # branches: + # - release # tags: # - "v[0-9]+.[0-9]+.[0-9]+" # -- 2.49.1 From 6343f1de4dee968858d6c9ac6af2e634ad815d4a Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:19:14 +0600 Subject: [PATCH 13/24] Update Dockerfile.windows --- client/Dockerfile.windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index b867b19..c151d3f 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -32,7 +32,7 @@ RUN apt update && apt install -y \ lld \ llvm -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN rustup target add x86_64-pc-windows-msvc -- 2.49.1 From edd5a69cd4a86f6aae8516656148a3702fadb719 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:24:34 +0600 Subject: [PATCH 14/24] Update Dockerfile.windows --- client/Dockerfile.windows | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index c151d3f..75fc418 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -34,6 +34,8 @@ RUN apt update && apt install -y \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH=/root/.cargo/bin:$PATH + RUN rustup target add x86_64-pc-windows-msvc RUN cargo install --locked cargo-xwin -- 2.49.1 From d870b7c1f1fef354570fcbfc04ab6a91eb9a9271 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:27:02 +0600 Subject: [PATCH 15/24] Update Dockerfile.windows --- client/Dockerfile.windows | 1 + 1 file changed, 1 insertion(+) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 75fc418..15450fe 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -42,4 +42,5 @@ RUN cargo install --locked cargo-xwin RUN yarn tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc + RUN ls -la -- 2.49.1 From adb539350fb0b864d26aa50137e9c764a55c946d Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:37:41 +0600 Subject: [PATCH 16/24] Update Dockerfile.windows --- client/Dockerfile.windows | 1 - 1 file changed, 1 deletion(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 15450fe..75fc418 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -42,5 +42,4 @@ RUN cargo install --locked cargo-xwin RUN yarn tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc - RUN ls -la -- 2.49.1 From a7fe94abec58ce202bf18d37dcc20f9f75e89177 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 22:40:13 +0600 Subject: [PATCH 17/24] Update Dockerfile.windows --- client/Dockerfile.windows | 1 + 1 file changed, 1 insertion(+) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 75fc418..15450fe 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -42,4 +42,5 @@ RUN cargo install --locked cargo-xwin RUN yarn tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc + RUN ls -la -- 2.49.1 From 687a2958c07cced786204752680dbc1d9d4f5f8e Mon Sep 17 00:00:00 2001 From: opti1337 Date: Mon, 22 Dec 2025 23:35:59 +0600 Subject: [PATCH 18/24] Update Dockerfile.windows --- client/Dockerfile.windows | 1 - 1 file changed, 1 deletion(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 15450fe..75fc418 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -42,5 +42,4 @@ RUN cargo install --locked cargo-xwin RUN yarn tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc - RUN ls -la -- 2.49.1 From b887b6999733afbb7005728eada2394f98caac62 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Tue, 23 Dec 2025 00:07:40 +0600 Subject: [PATCH 19/24] Update Dockerfile.windows --- client/Dockerfile.windows | 1 + 1 file changed, 1 insertion(+) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 75fc418..ceeb40d 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -29,6 +29,7 @@ ENV COMMIT_SHA=$COMMIT_SHA \ RUN apt update && apt install -y \ nsis \ + clang \ lld \ llvm -- 2.49.1 From 649b49a732cc03ef8119ed0d99ef3df13d35257d Mon Sep 17 00:00:00 2001 From: opti1337 Date: Tue, 23 Dec 2025 00:27:01 +0600 Subject: [PATCH 20/24] update --- .gitea/workflows/deploy-client.yml | 8 +++++++- client/Dockerfile.windows | 4 +++- client/src-tauri/tauri.conf.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index 6ca7ae5..7978d1f 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -28,7 +28,13 @@ jobs: persist-credentials: false - name: Build - run: docker build -t chad-client-windows -f ./client/Dockerfile.windows ./client --build-arg COMMIT_SHA=${{ gitea.sha }} --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} + run: docker build \ + -t chad-client-windows \ + -f ./client/Dockerfile.windows \ + ./client \ + --build-arg COMMIT_SHA=${{ gitea.sha }} \ + --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} \ + --build-arg TAURI_SIGNING_PRIVATE_KEY=${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} # publish-web: # runs-on: ubuntu-latest diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index ceeb40d..2a5bbcb 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -23,9 +23,11 @@ COPY . . ARG COMMIT_SHA=unknown ARG API_BASE_URL +ARG TAURI_SIGNING_PRIVATE_KEY ENV COMMIT_SHA=$COMMIT_SHA \ - API_BASE_URL=$API_BASE_URL + API_BASE_URL=$API_BASE_URL \ + TAURI_SIGNING_PRIVATE_KEY=$TAURI_SIGNING_PRIVATE_KEY RUN apt update && apt install -y \ nsis \ diff --git a/client/src-tauri/tauri.conf.json b/client/src-tauri/tauri.conf.json index 4efaa6a..4b095e9 100644 --- a/client/src-tauri/tauri.conf.json +++ b/client/src-tauri/tauri.conf.json @@ -44,7 +44,7 @@ }, "plugins": { "updater": { - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDI3NDM5Q0I4MDI5M0MyRjQKUldUMHdwTUN1SnhESjBoUFpuWkJxRzFqcWJxdTY4UkNvMmUzcHFnZnJtbSs3WmJoUmhxQ3R5bWYK", + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU3MzkxMzM3RkQ3NTg4QUQKUldTdGlIWDlOeE01NStIak9VbmZTTm9HY2NyNUQrVXB5ZEdIN1BkK2lhYW9zWkNCQnZQSjRmelIK", "endpoints": [ "https://git.koptilnya.xyz/opti1337/chad/releases/download/latest/latest.json" ] -- 2.49.1 From a7d65f0e3c2d6f200768ce4c5925b996c4b8aa25 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Tue, 23 Dec 2025 00:27:43 +0600 Subject: [PATCH 21/24] Update deploy-client.yml --- .gitea/workflows/deploy-client.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index 7978d1f..c083ca9 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -28,13 +28,14 @@ jobs: persist-credentials: false - name: Build - run: docker build \ - -t chad-client-windows \ - -f ./client/Dockerfile.windows \ - ./client \ - --build-arg COMMIT_SHA=${{ gitea.sha }} \ - --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} \ - --build-arg TAURI_SIGNING_PRIVATE_KEY=${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + run: | + docker build \ + -t chad-client-windows \ + -f ./client/Dockerfile.windows \ + ./client \ + --build-arg COMMIT_SHA=${{ gitea.sha }} \ + --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} \ + --build-arg TAURI_SIGNING_PRIVATE_KEY=${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} # publish-web: # runs-on: ubuntu-latest -- 2.49.1 From 50c56e87ff95958ffbc6a2b926894985c36d535d Mon Sep 17 00:00:00 2001 From: opti1337 Date: Tue, 23 Dec 2025 00:37:41 +0600 Subject: [PATCH 22/24] Update Dockerfile.windows --- client/Dockerfile.windows | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 2a5bbcb..9e2174f 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -27,7 +27,8 @@ ARG TAURI_SIGNING_PRIVATE_KEY ENV COMMIT_SHA=$COMMIT_SHA \ API_BASE_URL=$API_BASE_URL \ - TAURI_SIGNING_PRIVATE_KEY=$TAURI_SIGNING_PRIVATE_KEY + TAURI_SIGNING_PRIVATE_KEY=$TAURI_SIGNING_PRIVATE_KEY \ + TAURI_SIGNING_PRIVATE_KEY_PASSWORD= RUN apt update && apt install -y \ nsis \ -- 2.49.1 From 72f46df4d18ad34f24c946b887a8a1479466b42f Mon Sep 17 00:00:00 2001 From: opti1337 Date: Tue, 23 Dec 2025 00:59:01 +0600 Subject: [PATCH 23/24] update --- .gitea/workflows/deploy-client.yml | 14 +++++++++++++- client/Dockerfile.windows | 11 ----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index c083ca9..f4cb0d0 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -30,13 +30,25 @@ jobs: - name: Build run: | docker build \ - -t chad-client-windows \ + -t chad-client-windows-builder \ -f ./client/Dockerfile.windows \ ./client \ --build-arg COMMIT_SHA=${{ gitea.sha }} \ --build-arg API_BASE_URL=${{ vars.API_BASE_URL }} \ --build-arg TAURI_SIGNING_PRIVATE_KEY=${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + docker create --name chad-client-windows-container chad-client-windows-builder + docker cp chad-client-windows-container:/app/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis ./nsis + docker rm chad-client-windows-container + + - name: Publish + uses: akkuman/gitea-release-action@v1 + with: + files: | + nsis/** + body: "New version" + draft: true + # publish-web: # runs-on: ubuntu-latest diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 9e2174f..6036e25 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -1,18 +1,7 @@ FROM node:lts -# SHELL ["/bin/bash", "-c"] - WORKDIR /app -# RUN apt update -# -# RUN apt install -y curl unzip - -# RUN curl -fsSL https://fnm.vercel.app/install | bash - -# RUN ~/.local/share/fnm/fnm install 24 -# RUN ~/.local/share/fnm/fnm use 24 - RUN corepack enable yarn RUN yarn set version stable -- 2.49.1 From aef93ef821edb112682a92b37a329f5aba1d4fad Mon Sep 17 00:00:00 2001 From: opti1337 Date: Tue, 23 Dec 2025 20:50:13 +0600 Subject: [PATCH 24/24] update --- .gitea/workflows/deploy-client.yml | 9 +++---- client/Dockerfile.windows | 2 ++ client/scripts/generate-updater.mjs | 41 +++++++++++++++++++++++++++++ client/src-tauri/tauri.conf.json | 4 +-- 4 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 client/scripts/generate-updater.mjs diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index f4cb0d0..5404c56 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -2,11 +2,9 @@ name: Deploy on: push: - # branches: - # - release - # tags: - # - "v[0-9]+.[0-9]+.[0-9]+" - # + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + paths: - ".gitea/workflows/deploy-client.yml" - "client/**" @@ -46,7 +44,6 @@ jobs: with: files: | nsis/** - body: "New version" draft: true # publish-web: diff --git a/client/Dockerfile.windows b/client/Dockerfile.windows index 6036e25..a14e3a4 100644 --- a/client/Dockerfile.windows +++ b/client/Dockerfile.windows @@ -35,4 +35,6 @@ RUN cargo install --locked cargo-xwin RUN yarn tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc +RUN node scripts/generate-updater.js + RUN ls -la diff --git a/client/scripts/generate-updater.mjs b/client/scripts/generate-updater.mjs new file mode 100644 index 0000000..0a14901 --- /dev/null +++ b/client/scripts/generate-updater.mjs @@ -0,0 +1,41 @@ +import fs from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + +const TAURI_CONF = path.resolve(__dirname, '../src-tauri/tauri.conf.json') +const OUTPUT = path.resolve(__dirname, '../updater.json') + +const PLATFORM = 'windows-x86_64' +const BASE_URL = 'https://git.koptilnya.xyz/opti1337/chad/releases/download/latest' + +const tauriConfRaw = fs.readFileSync(TAURI_CONF, 'utf8') +const tauriConf = JSON.parse(tauriConfRaw) +const version = tauriConf.package.version + +const SIG_FILE = path.resolve( + __dirname, + `../src-tauri/target/release/bundle/nsis/chad_${version}_x64-setup.exe.sig`, +) + +const signature = fs.readFileSync(SIG_FILE, 'utf8').trim() + +const installerName = `chad_${version}_x64-setup.exe` + +const updater = { + pub_date: new Date().toISOString(), + version, + platforms: { + [PLATFORM]: { + url: `${BASE_URL}/${installerName}`, + signature, + }, + }, + notes: '', +} + +fs.writeFileSync(OUTPUT, JSON.stringify(updater, null, 2), 'utf8') + +console.log('updater.json generated') diff --git a/client/src-tauri/tauri.conf.json b/client/src-tauri/tauri.conf.json index 4b095e9..569d9a4 100644 --- a/client/src-tauri/tauri.conf.json +++ b/client/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "chad", - "version": "0.2.5-rc.2", + "version": "0.2.6", "identifier": "xyz.koptilnya.chad", "build": { "frontendDist": "../.output/public", @@ -46,7 +46,7 @@ "updater": { "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU3MzkxMzM3RkQ3NTg4QUQKUldTdGlIWDlOeE01NStIak9VbmZTTm9HY2NyNUQrVXB5ZEdIN1BkK2lhYW9zWkNCQnZQSjRmelIK", "endpoints": [ - "https://git.koptilnya.xyz/opti1337/chad/releases/download/latest/latest.json" + "https://git.koptilnya.xyz/opti1337/chad/releases/download/latest/updater.json" ] } } -- 2.49.1