Release #14
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: Release | ||
on: | ||
workflow_dispatch: | ||
# NOTE: For Linux builds, we can only build with Ubuntu. It should be the oldest base system we intend to support. See PR-759 & https://tauri.app/v1/guides/building/linux for reference. | ||
jobs: | ||
desktop-main: | ||
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 | ||
name: Desktop - Main ${{ matrix.settings.target }} | ||
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: Remove 32-bit libs | ||
if: ${{ runner.os == 'Linux' }} | ||
run: | | ||
dpkg -l | grep i386 | ||
sudo apt-get purge --allow-remove-essential libc6-i386 ".*:i386" | ||
sudo dpkg --remove-architecture i386 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.x.x | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
token: ${{ inputs.token }} | ||
check-latest: true | ||
node-version-file: '.nvmrc' | ||
- name: Install pnpm deps | ||
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }} | ||
Check failure on line 71 in .github/workflows/release.yml GitHub Actions / ReleaseInvalid workflow file
|
||
run: pnpm i --frozen-lockfile | ||
- name: Install Rust | ||
id: toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: ${{ inputs.targets }} | ||
toolchain: stable | ||
components: clippy, rustfmt | ||
- name: Cache Rust Dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
save-if: ${{ inputs.save-cache }} | ||
prefix-key: 'v0-rust-deps' | ||
shared-key: ${{ inputs.targets }} | ||
- 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 |