feat(commands/groups chats/[id]/+page): add invoice description #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Linux Build" | |
# Restrict permissions to only what's needed | |
permissions: | |
contents: read | |
packages: read | |
actions: write # Needed for artifact upload | |
on: | |
workflow_call: | |
secrets: | |
GPG_PRIVATE_KEY: | |
required: true | |
GPG_PASSPHRASE: | |
required: true | |
push: | |
branches: | |
- master | |
paths: | |
- 'src-tauri/**' | |
- 'src/**' | |
- 'static/**' | |
- 'package.json' | |
- 'bun.lockb' | |
- 'svelte.config.js' | |
- 'tailwind.config.js' | |
- 'vite.config.js' | |
- '.github/workflows/build_linux.yml' | |
pull_request: | |
paths: | |
- 'src-tauri/**' | |
- 'src/**' | |
- 'static/**' | |
- 'package.json' | |
- 'bun.lockb' | |
- 'svelte.config.js' | |
- 'tailwind.config.js' | |
- 'vite.config.js' | |
- '.github/workflows/build_linux.yml' | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
outputs: | |
version: ${{ steps.get-version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get version from Cargo.toml | |
id: get-version | |
run: | | |
VERSION=$(grep '^version[[:space:]]*=[[:space:]]*"' src-tauri/Cargo.toml | sed 's/^version[[:space:]]*=[[:space:]]*"\(.*\)"/\1/') | |
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
build-linux: | |
needs: setup | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
env: | |
VERSION: ${{ needs.setup.outputs.version }} | |
CARGO_INCREMENTAL: 0 # Disable incremental compilation for CI | |
RUST_BACKTRACE: 1 # Better error reporting | |
CARGO_NET_RETRY: 2 # Retry network requests to handle temporary issues | |
RUSTFLAGS: "-C target-cpu=x86-64" # Optimize for x86-64 architecture | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: 1.1.39 | |
- name: Cache frontend dependencies | |
uses: actions/cache@v4 | |
id: cache-frontend-deps | |
with: | |
path: | | |
~/.bun/install/cache | |
node_modules | |
key: frontend-deps-linux-${{ hashFiles('**/bun.lockb') }} | |
restore-keys: | | |
frontend-deps-linux- | |
- name: Install frontend dependencies | |
if: steps.cache-frontend-deps.outputs.cache-hit != 'true' | |
run: bun install | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: x86_64-unknown-linux-gnu | |
- name: Cache Rust dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: rust-deps-linux-${{ runner.os }}-rust-stable-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
rust-deps-linux-${{ runner.os }}-rust-stable- | |
- name: Add Rust build cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "src-tauri -> target" | |
key: linux-rust-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install Linux dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libwebkit2gtk-4.1-dev \ | |
libappindicator3-dev \ | |
librsvg2-dev \ | |
patchelf \ | |
libfuse2 \ | |
fuse \ | |
libglib2.0-dev \ | |
libcairo2-dev \ | |
libpango1.0-dev \ | |
libasound2-dev \ | |
libgtk-3-dev \ | |
desktop-file-utils | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
trust_level: 5 | |
- name: Build Linux Desktop App | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
LDAI_SIGN: true | |
LDAI_SIGN_KEY: ${{ steps.import_gpg.outputs.keyid }} | |
LDAI_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
TAURI_SIGNING_KEY: ${{ steps.import_gpg.outputs.keyid }} | |
TAURI_SIGNING_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
RPM_SIGNING_KEY: ${{ steps.import_gpg.outputs.keyid }} | |
RPM_SIGNING_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Generate Linux artifact hashes | |
run: | | |
cd src-tauri/target/release/bundle | |
find . -type f -name "*.deb" -exec sh -c ' | |
FILE="$1" | |
sha256sum "$FILE" | sed "s| .*| whitenoise-${VERSION}-linux-amd64.deb|" > "${FILE}.sha256" | |
' sh {} \; | |
find . -type f -name "*.rpm" -exec sh -c ' | |
FILE="$1" | |
sha256sum "$FILE" | sed "s| .*| whitenoise-${VERSION}-linux-x86_64.rpm|" > "${FILE}.sha256" | |
' sh {} \; | |
find . -type f -name "*.AppImage" -exec sh -c ' | |
FILE="$1" | |
sha256sum "$FILE" | sed "s| .*| whitenoise-${VERSION}-linux-x86_64.AppImage|" > "${FILE}.sha256" | |
' sh {} \; | |
- name: Prepare Linux artifacts | |
run: | | |
mkdir -p desktop-artifacts | |
find src-tauri/target/release/bundle/deb -name "*.deb" -exec sh -c ' | |
cp "$1" desktop-artifacts/whitenoise-${VERSION}-linux-amd64.deb | |
cp "${1}.sha256" desktop-artifacts/whitenoise-${VERSION}-linux-amd64.deb.sha256 | |
' sh {} \; | |
find src-tauri/target/release/bundle/rpm -name "*.rpm" -exec sh -c ' | |
cp "$1" desktop-artifacts/whitenoise-${VERSION}-linux-x86_64.rpm | |
cp "${1}.sha256" desktop-artifacts/whitenoise-${VERSION}-linux-x86_64.rpm.sha256 | |
' sh {} \; | |
find src-tauri/target/release/bundle/appimage -name "*.AppImage" -exec sh -c ' | |
cp "$1" desktop-artifacts/whitenoise-${VERSION}-linux-x86_64.AppImage | |
cp "${1}.sha256" desktop-artifacts/whitenoise-${VERSION}-linux-x86_64.AppImage.sha256 | |
' sh {} \; | |
- name: Upload Linux artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-x86_64 | |
path: desktop-artifacts/* |