Update dependency tailwindcss to v4 #2408
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: 'test' | |
on: | |
- push | |
jobs: | |
test-tauri: | |
name: Test ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: 'macos-15' | |
type: 'desktop' | |
args: '--target aarch64-apple-darwin' | |
target-path: '/aarch64-apple-darwin' | |
name: 'macOS 15 (ARM64)' | |
rust-targets: 'aarch64-apple-darwin' | |
- platform: 'macos-13' | |
type: 'desktop' | |
args: '--target x86_64-apple-darwin' | |
target-path: '/x86_64-apple-darwin' | |
name: 'macOS 13 (AMD64)' | |
rust-targets: 'x86_64-apple-darwin' | |
- platform: 'ubuntu-22.04' | |
type: 'desktop' | |
args: '' | |
target-path: '' | |
name: 'Ubuntu 22.04' | |
rust-targets: '' | |
- platform: 'windows-2025' | |
type: 'desktop' | |
args: '' | |
target-path: '' | |
name: 'Windows Server 2025' | |
rust-targets: '' | |
- platform: 'ubuntu-22.04' | |
type: 'android' | |
args: '' | |
target-path: '' | |
name: 'Android' | |
rust-targets: 'aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android' | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: 'Shared: Checkout repository' | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: 'Shared: Set up nasm' | |
uses: ilammy/setup-nasm@v1 | |
- name: 'Shared: Setup node' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: 'Shared: Install pnpm' | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: 'Shared: Install Rust toolchain' | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.rust-targets }} | |
- name: 'Desktop: Cache dependencies' | |
if: matrix.type == 'desktop' | |
uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: ${{ matrix.name }} | |
workspaces: src-tauri | |
cache-on-failure: true | |
cache-all-crates: true | |
- name: 'Ubuntu: Install linux dependencies' | |
if: matrix.name == 'Ubuntu 22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf librust-atk-dev jq | |
- name: 'Shared: Install frontend dependencies' | |
run: pnpm install | |
- name: 'Desktop: Build Tauri project' | |
if: matrix.type == 'desktop' | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
includeDebug: true | |
includeRelease: false | |
args: ${{ matrix.args }} | |
- name: 'Desktop: Upload artifacts (Ubuntu)' | |
uses: actions/upload-artifact@v4 | |
if: matrix.name == 'Ubuntu 22.04' | |
with: | |
name: tauri-artifact-ubuntu-2204 | |
path: | | |
./src-tauri/target${{ matrix.target-path }}/debug/bundle/appimage/*.AppImage | |
./src-tauri/target${{ matrix.target-path }}/debug/bundle/deb/*.deb | |
if-no-files-found: error | |
- name: 'Desktop: Upload artifacts (macOS ARM64)' | |
uses: actions/upload-artifact@v4 | |
if: matrix.name == 'macOS 15 (ARM64)' | |
with: | |
name: tauri-artifact-macos-15-arm64 | |
path: | | |
./src-tauri/target${{ matrix.target-path }}/debug/bundle/dmg/*.dmg | |
./src-tauri/target${{ matrix.target-path }}/debug/bundle/macos/*.app | |
if-no-files-found: error | |
- name: 'Desktop: Upload artifacts (macOS AMD64)' | |
uses: actions/upload-artifact@v4 | |
if: matrix.name == 'macOS 13 (AMD64)' | |
with: | |
name: tauri-artifact-macos-13-amd64 | |
path: | | |
./src-tauri/target${{ matrix.target-path }}/debug/bundle/dmg/*.dmg | |
./src-tauri/target${{ matrix.target-path }}/debug/bundle/macos/*.app | |
if-no-files-found: error | |
- name: 'Desktop: Upload artifacts (Windows)' | |
uses: actions/upload-artifact@v4 | |
if: matrix.name == 'Windows Server 2025' | |
with: | |
name: tauri-artifact-windows-2025 | |
path: | | |
./src-tauri/target${{ matrix.target-path }}/debug/bundle/nsis/*.exe | |
if-no-files-found: error | |
########### | |
# Android # | |
########### | |
- name: 'Android: Install dependencies' | |
if: matrix.type == 'Android' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake golang-go libunwind-dev | |
- name: 'Android: Set up JDK 21' | |
if: matrix.type == 'Android' | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
check-latest: true | |
- name: 'Android: Setup Android SDK' | |
if: matrix.type == 'Android' | |
uses: android-actions/setup-android@v3 | |
- name: 'Android: Set up NDK' | |
if: matrix.type == 'Android' | |
id: setup-ndk | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r26d | |
link-to-sdk: false | |
add-to-path: false | |
- name: 'Android: Install Tauri CLI' | |
if: matrix.type == 'Android' | |
run: | | |
cargo install --debug --force --locked tauri-cli | |
- name: 'Android: Decode JKS file' | |
if: matrix.type == 'Android' | |
run: | | |
echo "${{ secrets.TAURI_ANDROID_KEYSTORE_FILE }}" | base64 --decode > /tmp/keystore.jks | |
- name: 'Android: Configure Android build' | |
if: matrix.type == 'Android' | |
run: | | |
cat <<EOF > src-tauri/gen/android/keystore.properties | |
password=${{ secrets.TAURI_ANDROID_KEYSTORE_PASSWORD }} | |
keyAlias=upload | |
storeFile=/tmp/keystore.jks | |
EOF | |
- name: 'Android: Build Android project' | |
if: matrix.type == 'Android' | |
run: | | |
export ANDROID_SDK_HOME=$ANDROID_HOME | |
export PATH=$PATH:$ANDROID_HOME/tools | |
export PATH=$PATH:$ANDROID_HOME/platform-tools | |
export ANDROID_NDK=$NDK_HOME | |
export ANDROID_NDK_HOME=$NDK_HOME | |
export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH | |
cargo tauri android build | |
env: | |
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
- name: 'Android: Upload artifacts' | |
if: matrix.name == 'Android' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tauri-artifact-android | |
path: './src-tauri/gen/android/app/build/outputs' | |
if-no-files-found: error | |
flatpak: | |
name: Build Flatpak | |
runs-on: ubuntu-22.04 | |
container: | |
image: bilelmoussaoui/flatpak-github-actions:gnome-42 | |
options: --privileged | |
steps: | |
- name: 'Checkout repository' | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
persist-credentials: false | |
- name: 'Build Flatpak project' | |
uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | |
with: | |
bundle: soulfire.flatpak | |
manifest-path: com.soulfiremc.soulfire.yml | |
cache-key: flatpak-builder-${{ github.sha }} |