Skip to content

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-tauri-renderer:
permissions:
contents: write
packages: write
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Get version
id: get_version
uses: battila7/get-version-action@v2
- uses: pnpm/action-setup@v2
with:
version: 8.6.0
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: install frontend dependencies
run: pnpm install --no-frozen-lockfile # change this to npm or pnpm depending on which one you use
- uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
- name: build tauri renderer
run: pnpm build
- uses: actions/upload-artifact@v3
with:
name: tauri-renderer
path: dist/
build-tauri:
needs: [build-tauri-renderer]
permissions:
contents: write
packages: write
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
arch: x86_64
rust_target: x86_64-unknown-linux-gnu
- os: macos-13
arch: x86_64
rust_target: x86_64-apple-darwin
- os: macos-latest
arch: aarch64
rust_target: aarch64-apple-darwin
- os: windows-latest
arch: x86_64
rust_target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
- name: Get version
id: get_version
uses: battila7/get-version-action@v2
- uses: pnpm/action-setup@v2
with:
version: 8.6.0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Install frontend dependencies
run: pnpm install --no-frozen-lockfile # change this to npm or pnpm depending on which one you use
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.config.rust_target }}
toolchain: '1.78.0'
- name: Install dependencies (ubuntu only)
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev
sudo apt-get install -y libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
- name: Install dependencies (mac only)
if: matrix.config.os == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
- name: Change Version
env:
VERSION: "${{ steps.get_version.outputs.version-without-v }}"
run: make change-version change-package-version
- uses: actions/download-artifact@v3
with:
name: tauri-renderer
path: dist/
- name: Install Cargo Tauri for info
run: cargo install tauri-cli --version "=2.0.0-beta.13" --locked
- name: Tauri info
run: cargo tauri info
- uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
- name: Build Tauri App
uses: tauri-apps/tauri-action@v0
if: matrix.config.os != 'macos-latest' || matrix.config.arch != 'aarch64'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
releaseBody: ${{ needs.create-release.outputs.release_body }}
tauriScript: cargo tauri
updaterJsonPreferNsis: true
- name: Build Tauri App (macOS aarch64)
uses: tauri-apps/tauri-action@v0
if: matrix.config.os == 'macos-latest' && matrix.config.arch == 'aarch64'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --target aarch64-apple-darwin
tauriScript: cargo tauri
updaterJsonPreferNsis: true