Skip to content

[choreo] Upgrade to Tauri v2 #1935

[choreo] Upgrade to Tauri v2

[choreo] Upgrade to Tauri v2 #1935

Workflow file for this run

name: Build
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
env:
MACOSX_DEPLOYMENT_TARGET: 13
strategy:
fail-fast: false
matrix:
include:
- artifact-name: Windows-x86_64
os: windows-2022
tauri-build-flags:
- artifact-name: Windows-aarch64
os: windows-2022
tauri-build-flags: -- --target aarch64-pc-windows-msvc
- artifact-name: macOS-x86_64
os: macOS-14
tauri-build-flags: -- --target x86_64-apple-darwin
- artifact-name: macOS-arm64
os: macOS-14
tauri-build-flags: -- --target aarch64-apple-darwin
- artifact-name: Linux-x86_64
os: ubuntu-24.04
tauri-build-flags:
name: "${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update -q
sudo apt-get install -y \
build-essential \
curl \
file \
libayatana-appindicator3-dev \
libgtk-3-dev \
librsvg2-dev \
libssl-dev \
libwebkit2gtk-4.1-dev
- name: Install Node.js dependencies
run: npm install
continue-on-error: true
- name: Set up Windows aarch64 Rust compiler
if: matrix.artifact-name == 'Windows-aarch64'
run: rustup target install aarch64-pc-windows-msvc
- name: Set up macOS x86_64 Rust compiler
if: matrix.artifact-name == 'macOS-x86_64'
run: rustup target add x86_64-apple-darwin
- run: sudo xcode-select -switch /Applications/Xcode_15.3.app
if: startsWith(matrix.os, 'macOS')
- name: Build package
run: npm run tauri build ${{ matrix.tauri-build-flags }}
- name: Upload bundle (Windows)
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: src-tauri/target/**/release/bundle/nsis/*.exe
- name: Upload bundle (macOS)
if: startsWith(matrix.os, 'macOS')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: src-tauri/target/**/release/bundle/dmg/*.dmg
- name: Upload bundle (Linux)
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: |
src-tauri/target/**/release/bundle/appimage/*.AppImage
src-tauri/target/**/release/bundle/deb/*.deb
release:
name: Create draft release
needs: [build]
runs-on: ubuntu-24.04
if: |
github.repository_owner == 'SleipnirGroup' &&
startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download prebuilt binaries
uses: actions/download-artifact@v4
with:
path: pkg
- name: Display structure of downloaded files
run: ls -R
- name: Rename Windows x86_64 bundle
working-directory: pkg/Windows-x86_64/release/bundle/nsis
run: mv *.exe Choreo-${{ github.ref_name }}-Windows-x86_64.exe
- name: Rename Windows aarch64 bundle
working-directory: pkg/Windows-aarch64/aarch64-pc-windows-msvc/release/bundle/nsis
run: mv *.exe Choreo-${{ github.ref_name }}-Windows-aarch64.exe
- name: Rename macOS x86_64 bundle
working-directory: pkg/macOS-x86_64/x86_64-apple-darwin/release/bundle/dmg
run: mv *.dmg Choreo-${{ github.ref_name }}-macOS-x86_64.dmg
- name: Rename macOS arm64 bundle
working-directory: pkg/macOS-arm64/aarch64-apple-darwin/release/bundle/dmg
run: mv *.dmg Choreo-${{ github.ref_name }}-macOS-arm64.dmg
- name: Rename Linux x86_64 file (.AppImage)
working-directory: pkg/Linux-x86_64/release/bundle/appimage
run: mv *.AppImage Choreo-${{ github.ref_name }}-Linux-x86_64.AppImage
- name: Rename Linux x86_64 file (.deb)
working-directory: pkg/Linux-x86_64/release/bundle/deb
run: mv *.deb Choreo-${{ github.ref_name }}-Linux-x86_64.deb
- name: Display structure of renamed files
run: ls -R
- uses: ncipollo/release-action@v1
with:
name: Choreo ${{ github.ref_name }}
tag: ${{ github.ref_name }}
artifacts: "pkg/**/*.AppImage,pkg/**/*.exe,pkg/**/*.deb,pkg/**/*.dmg"
draft: true
prerelease: true