build
This commit is contained in:
@@ -27,7 +27,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Build
|
- 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
|
- name: Stop old container
|
||||||
run: docker rm -f chad-client || true
|
run: docker rm -f chad-client || true
|
||||||
@@ -45,30 +45,19 @@ jobs:
|
|||||||
chad-client:latest
|
chad-client:latest
|
||||||
|
|
||||||
publish-tauri:
|
publish-tauri:
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Keyscan
|
||||||
|
run: |
|
||||||
|
ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: setup node
|
- name: Checkout
|
||||||
uses: actions/setup-node@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
ssh-strict: false
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: install Rust stable
|
- name: Build
|
||||||
uses: dtolnay/rust-toolchain@stable
|
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 }}
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|||||||
32
client/Dockerfile.windows
Normal file
32
client/Dockerfile.windows
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user