Set up CI

This commit is contained in:
Joscha 2025-01-22 13:40:33 +01:00
parent 56d6be7e2f
commit 3a62af24d1
3 changed files with 71 additions and 1 deletions

56
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,56 @@
name: build
on:
push:
pull_request:
defaults:
run:
shell: bash
jobs:
main:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repo
uses: actions/checkout@v4
# https://doc.rust-lang.org/cargo/guide/continuous-integration.html#github-actions
- name: Set up rust
run: |
rustup update stable
rustup default stable
# - name: Set up node
# uses: actions/setup-node@v4
# with:
# cache: pnpm
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
# https://github.com/tauri-apps/tauri-action?tab=readme-ov-file#usage
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners
- name: Install tauri dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev
- name: Build
run: ./build
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.os }}
path: |
target/release/tta-cli
target/release/tta-cli.exe
target/release/tta-app
target/release/tta-app.exe

14
build Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
pushd tta-cli
cargo build --release
popd
pushd tta-app
pnpm install --frozen-lockfile
pnpm tauri build
popd
echo "tta-cli can be found at target/release/tta-cli"
echo "tta-app can be found at target/release/tta-app"

View file

@ -22,7 +22,7 @@
}
},
"bundle": {
"active": true,
"active": false,
"targets": "all",
"icon": [
"icons/32x32.png",