Skip to content

Update contributors (#133) #98

Update contributors (#133)

Update contributors (#133) #98

Workflow file for this run

name: "Canary"
on:
workflow_dispatch:
inputs:
branch:
description: Select branch
required: true
default: main
push:
branches:
- main
schedule:
- cron: 0 0 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: pnpm install
- name: Check format
run: pnpm check:format
- name: Lint
run: pnpm lint
build-tauri:
name: Build (${{ matrix.settings.os }})
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: universal-apple-darwin
toolchain: aarch64-apple-darwin,x86_64-apple-darwin
bundles: dmg
os: mac
- host: windows-latest
target: x86_64-pc-windows-msvc
toolchain: x86_64-pc-windows-msvc
bundles: nsis
os: windows
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: x86_64-unknown-linux-gnu
bundles: deb,appimage
os: linux
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
target: "${{ matrix.settings.toolchain }}"
- uses: Swatinem/rust-cache@v2
with:
workspaces: "apps/desktop/src-tauri/target"
- name: Install dependencies (ubuntu only)
if: matrix.settings.host == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install dependencies
run: pnpm install
- name: Patch canary version
uses: actions/github-script@v7
with:
script: |
const path = require("path");
const { script } = await import("file://" + path.resolve('./scripts/actions/patch-canary-version.js'));
await script({ github, context });
- uses: tauri-apps/tauri-action@dev
id: build_os
with:
projectPath: apps/desktop
args: --config "src-tauri/tauri.conf.canary.json" --target ${{ matrix.settings.target }} --bundles ${{ matrix.settings.bundles }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: "${{ secrets.TAURI_PRIVATE_KEY }}"
TAURI_PUBLIC_KEY: "${{ secrets.TAURI_PUBLIC_KEY }}"
VITE_AXIOM_TOKEN: "${{ secrets.VITE_AXIOM_TOKEN }}"
- name: Upload canary ${{ matrix.setting.os }}
uses: actions/upload-artifact@v4
with:
name: "overlayed-canary-${{ matrix.settings.os }}"
path: "${{ join(fromJSON(steps.build_os.outputs.artifactPaths), '\n') }}"