Compare commits

...

25 commits

Author SHA1 Message Date
Vomitblood 7fa1c91a48 updated github actions workflow 2024-08-08 01:55:52 +08:00
Vomitblood 3e3fa2124f updated github actions workflow 2024-08-08 01:53:13 +08:00
Vomitblood 90b780a722 updated github actions workflow 2024-08-08 01:51:30 +08:00
Vomitblood 6db3ea021b updated github actions workflow 2024-08-08 01:48:10 +08:00
Vomitblood 310dee7050 updated github actions workflow 2024-08-08 01:47:09 +08:00
Vomitblood 02793f0851 updated github actions workflow 2024-08-08 01:44:46 +08:00
Vomitblood 7d4d8827d0 updated github actions workflow 2024-08-08 01:40:09 +08:00
Vomitblood d57e785613 updated github actions workflow 2024-08-08 01:38:39 +08:00
Vomitblood 5ec8cfa515 updated github actions workflow 2024-08-08 01:37:46 +08:00
Vomitblood 88ef1a77d6 updated github actions workflow 2024-08-08 01:31:49 +08:00
Vomitblood a4568681c8 updated github actions workflow 2024-08-08 01:27:13 +08:00
Vomitblood cbe9fc1cc5 updated github actions workflow 2024-08-08 01:24:52 +08:00
Vomitblood 7e27662e0a updated github actions workflow 2024-08-08 01:23:02 +08:00
Vomitblood ac32e3917d updated github actions workflow 2024-08-08 01:21:33 +08:00
Vomitblood c695cc688f updated github actions workflow 2024-08-08 01:20:30 +08:00
Vomitblood 51f2ba4eef updated github actions workflow 2024-08-08 01:18:04 +08:00
Vomitblood cf248a947b updated github actions workflow 2024-08-08 01:15:21 +08:00
Vomitblood 70a247ba42 updated github actions workflow 2024-08-08 01:10:51 +08:00
Vomitblood 767992249b updated github actions workflow 2024-08-08 01:09:09 +08:00
Vomitblood acdc739bbc updated github actions workflow 2024-08-08 01:07:51 +08:00
Vomitblood 6fa24af2d8 updated github actions workflow 2024-08-08 01:06:08 +08:00
Vomitblood ebc527a79a updated github actions workflow 2024-08-08 00:58:51 +08:00
Vomitblood 8753805c36 updated github actions workflow 2024-08-08 00:56:20 +08:00
Vomitblood 716c2a1867 updated github actions workflow 2024-08-08 00:52:27 +08:00
Vomitblood c1531bb53b changed github actions workflow to install rustup with defaults accepted 2024-08-08 00:49:53 +08:00
2 changed files with 41 additions and 21 deletions

View file

@ -1,4 +1,4 @@
name: Test Build Frontend name: Build
on: on:
push: push:
@ -15,30 +15,21 @@ jobs:
image: ubuntu:22.04 image: ubuntu:22.04
steps: steps:
- name: Install git - name: Update APT
run: apt update && apt install -y git run: apt update
- name: Install Git and dependencies for Tauri
run: apt install -y git libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Get Variables - name: Get Variables
run: | run: |
git config --global --add safe.directory /__w/stort/stort git config --global --add safe.directory /__w/stort/stort
echo "TAG_NAME=commit-$(date +%Y%m%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV echo "TAG_NAME=commit-$(date +%Y%m%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Update packages - name: Install Mise
run: apt update && apt upgrade -y
- name: Install dependencies for Tauri
run: apt install -y libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
rustup update
- name: Install mise
run: | run: |
install -dm 755 /etc/apt/keyrings install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
@ -46,16 +37,19 @@ jobs:
apt update apt update
apt install -y mise apt install -y mise
- name: Install mise tools - name: Install Mise Tools
run: | run: |
mise install mise install
mise settings set experimental true mise settings set experimental true
- name: Install bun packages - name: Install Bun Packages
run: mise exec bun --command 'bun install' run: mise exec bun --command 'bun install'
- name: Build Tauri - name: Build Tauri
run: mise exec bun --command 'bun run tauri build' run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
mise exec bun --command 'bun run tauri build'
- name: Create Release - name: Create Release
id: create_release id: create_release
@ -68,7 +62,7 @@ jobs:
draft: false draft: false
prerelease: false prerelease: false
- name: Upload build to release - name: Upload Build to Release
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

26
build2.sh Normal file
View file

@ -0,0 +1,26 @@
#!/bin/bash
IMAGE_NAME="ubuntu:22.04"
HOST_PROJECT_DIR="$PWD"
CONTAINER_PROJECT_DIR="/app"
HOST_OUTPUT_DIR="$PWD/src-tauri/target/release/bundle/appimage"
CONTAINER_OUTPUT_DIR="$CONTAINER_PROJECT_DIR/src-tauri/target/release/bundle/appimage"
USER_ID=$(id -u)
GROUP_ID=$(id -g)
docker pull $IMAGE_NAME
# run the docker image and remove on completion
docker run --rm -it \
-v "$HOST_PROJECT_DIR":$CONTAINER_PROJECT_DIR \
$IMAGE_NAME \
/bin/bash -c "
# update packages
apt update && apt install curl -y && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
echo $HOME && \
source "/root/.cargo/env" && \
cargo --version
"