Skip to content

build: don't build debug by default #39

build: don't build debug by default

build: don't build debug by default #39

Workflow file for this run

name: 'publish'
on:
push:
branches:
- main
paths:
- 'apps/tauri/**'
- '.github/workflows/release-tauri.yml'
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform:
[
{ os: 'macos-latest', target: 'aarch64-apple-darwin' },
{ os: 'macos-latest', target: 'x86_64-apple-darwin' },
{ os: 'ubuntu-20.04', target: 'x86_64-unknown-linux-gnu' },
{ os: 'windows-latest', target: 'x86_64-pc-windows-msvc' },
]
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies (ubuntu only)
if: matrix.platform.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev alsa
- name: Install rust apple arm target (macos aarch64 only)
if: matrix.platform.target == 'aarch64-apple-darwin'
run: rustup target add aarch64-apple-darwin
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './apps/tauri/src-tauri -> target'
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: install frontend dependencies
run: pnpm install
- name: build dependencies
run: pnpm build --filter=api
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VITE_API_URL: ${{ vars.VITE_API_URL }}
VITE_WEB_URL: ${{ vars.VITE_WEB_URL }}
with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
projectPath: ./apps/tauri
args: --target ${{ matrix.platform.target }}