Skip to content

Release

Release #9

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
strategy:
fail-fast: true
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
bundles: dmg
- host: macos-latest
target: aarch64-apple-darwin
bundles: dmg
- host: windows-latest
target: x86_64-pc-windows-msvc
bundles: msi
- host: ubuntu-20.04
target: x86_64-unknown-linux-gnu
bundles: appimage
platform: [macos-latest, ubuntu-20.04, windows-latest]
pnpm-version: [8.8.0]
node-version: [18]
runs-on: ${{ matrix.settings.host }}
steps:
- name: Maximize build space
if: ${{ runner.os == 'Linux' }}
uses: easimon/maximize-build-space@master
with:
swap-size-mb: 3072
root-reserve-mb: 6144
remove-dotnet: 'true'
remove-codeql: 'true'
remove-haskell: 'true'
remove-docker-images: 'true'
- name: Checkout repository
uses: actions/checkout@v3
- name: Symlink target to C:\
if: ${{ runner.os == 'Windows' }}
shell: powershell
run: |
New-Item -ItemType Directory -Force -Path C:\ollama_target
New-Item -Path target -ItemType Junction -Value C:\ollama_target
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Pnpm install
uses: pnpm/action-setup@v2
with:
version: ${{ matrix.pnpm-version }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
check-latest: true
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Sync node version and setup cache
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'pnpm' # Set this to npm, yarn or pnpm.
- name: Install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm i # Change this to npm, yarn or pnpm.
- name: Build
run: |
pnpm tauri build --ci -v --target ${{ matrix.settings.target }} --bundles ${{ matrix.settings.bundles }}
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Publish Artifacts
uses: ./.github/actions/publish-artifacts
with:
target: ${{ matrix.settings.target }}
profile: release