Skip to content

retrom-v0.7.7

retrom-v0.7.7 #215

Workflow file for this run

name: Publish Clients Applications
on:
workflow_dispatch:
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-desktop-clients:
env:
PQ_LIB_STATIC: 1
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest" # for Arm based macs (M1 and above).
config: "--config tauri.build.conf.json"
target: "--target aarch64-apple-darwin"
# rustflags: "-L/usr/local/opt/libpq/lib"
- platform: "macos-latest" # for Intel based macs.
config: "--config tauri.build.conf.json"
target: "--target x86_64-apple-darwin"
# rustflags: "-L/usr/local/opt/libpq/lib"
- platform: "ubuntu-24.04"
config: "--config tauri.build.conf.json"
- platform: "windows-latest"
config: "--config tauri.build.conf.json"
# rustflags: "-LC:\\Program\ Files\\PostgreSQL\\17\\lib"
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: install Rust stable
id: rust
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies (ubuntu 24 only)
if: matrix.platform == 'ubuntu-24.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libpq-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libwebkit2gtk-4.1-0=2.44.0-2 \
libwebkit2gtk-4.1-dev=2.44.0-2 \
libjavascriptcoregtk-4.1-0=2.44.0-2 \
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
gir1.2-webkit2-4.1=2.44.0-2
- name: install dependencies (windows only)
if: matrix.platform == 'windows-latest' # This must match the platform value defined above.
run: |
choco install -y postgresql
- name: install dependencies (macos m1 only)
if: matrix.target == '--target aarch64-apple-darwin' # This must match the value defined above.
run: |
brew install postgresql@17
- name: install dependencies (macos intel only)
if: matrix.target == '--target x86_64-apple-darwin' # This must match the value defined above.
run: |
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install postgresql@17
- name: install frontend dependencies
run: pnpm install && pnpm exec buf generate
- name: build release binary
if: ${{ github.event_name == 'release' }}
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ""
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
VITE_IS_DESKTOP: true
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
RUSTFLAGS: ${{ matrix.rustflags }}
with:
projectPath: packages/client
tauriScript: pnpm tauri
releaseId: ${{ github.event.release.id }}
releaseBody: ${{ github.event.release.body }}
tagName: ${{ github.event.release.tag_name }}
args: ${{ matrix.config }} ${{ matrix.target }}
updaterJsonPreferNsis: true
- name: build pre-release binary
if: ${{ github.event_name == 'pull_request' }}
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VITE_IS_DESKTOP: true
RUSTFLAGS: ${{ matrix.rustflags }}
with:
includeDebug: true
includeRelease: false
projectPath: packages/client
tauriScript: pnpm tauri
args: ${{ matrix.target }}
prerelease: true
releaseDraft: ${{ !startsWith(github.event.pull_request.head.ref, 'release-plz') }}
releaseName: ${{ github.event.pull_request.title }}-pre.${{ github.event.pull_request.head.sha }}
tagName: ${{ github.event.pull_request.title }}-pre.${{ github.event.pull_request.head.sha }}