merge experimental into main (#42)

This commit is contained in:
/home/neo
2026-05-16 20:23:15 +03:00
committed by GitHub
parent e29fd4da6f
commit 46e04a7c4b
11 changed files with 217 additions and 147 deletions

View File

@@ -55,7 +55,7 @@ jobs:
run: pnpm install
- name: build Tauri app
run: pnpm tauri build -- ${{ matrix.args }}
run: pnpm run tauri:build -- ${{ matrix.args }}
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
@@ -65,23 +65,27 @@ jobs:
run: |
mkdir -p pkg_temp/scripts
cp scripts/postinstall.sh pkg_temp/scripts/
APP_PATH=$(find src-tauri/target/release/bundle/macos/ -name "*.app" | head -1)
MACOS_BUNDLE_DIR=$(find src-tauri/target -path "*/release/bundle/macos" -type d | head -n 1)
APP_PATH=$(find "$MACOS_BUNDLE_DIR" -name "*.app" -type d | head -n 1)
if [ -z "$APP_PATH" ]; then
echo "No .app found in $MACOS_BUNDLE_DIR"
exit 1
fi
APP_NAME=$(basename "$APP_PATH")
pkgbuild --root "$APP_PATH/.." \
--install-location /Applications \
--scripts pkg_temp/scripts \
--identifier "com.emerald.legacy" \
--version "1.0.0" \
--install-location "/Applications" \
--root "$APP_PATH" \
"Emerald-Legacy-Launcher.pkg"
mv "Emerald-Legacy-Launcher.pkg" src-tauri/target/release/bundle/macos/
mv "Emerald-Legacy-Launcher.pkg" "$MACOS_BUNDLE_DIR/"
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: src-tauri/target/release/bundle/
path: |
src-tauri/target/*/release/bundle/**/*
build-flatpak:
runs-on: ubuntu-latest

View File

@@ -14,12 +14,16 @@ jobs:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
artifact-name: macos-aarch64
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
artifact-name: macos-x86_64
- platform: 'ubuntu-22.04'
args: ''
artifact-name: linux
- platform: 'windows-latest'
args: ''
artifact-name: windows
runs-on: ${{ matrix.platform }}
steps:
@@ -53,18 +57,34 @@ jobs:
- name: install frontend dependencies
run: pnpm install
- name: build and fix macOS
if: matrix.platform == 'macos-latest'
run: |
pnpm tauri build ${{ matrix.args }}
pnpm run post-build:macos
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build Tauri app
run: pnpm run tauri:build -- ${{ matrix.args }}
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
tagName: nightly
releaseName: 'Emerald Nightly'
releaseBody: |
name: ${{ matrix.artifact-name }}
path: |
src-tauri/target/*/release/bundle/**/*
nightly-release:
needs: [nightly-tauri, nightly-flatpak]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: '*'
merge-multiple: true
path: artifacts
- uses: softprops/action-gh-release@v2
with:
tag_name: nightly
name: 'Emerald Nightly'
body: |
# Emerald Legacy Launcher (Nightly)
# What to download?
- `Emerald.Legacy.Launcher-*.rpm` for GNU/Linux (RHEL)
@@ -77,16 +97,17 @@ jobs:
---
# Windows SmartScreen
This software is completely safe. Because the launcher is unsigned, you will see a "Windows protected your PC" window. To proceed:
1. Click the **"More info"** link under the main text.
2. Click the **"Run anyway"** button that appears.
---
# macOS "Damaged" Error Fix
The macOS builds now include automatic fixes for Gatekeeper quarantine issues. The app should launch without "application is damaged" errors.
releaseDraft: false
files: artifacts/*
fail_on_unmatched_files: false
prerelease: true
args: ${{ matrix.args }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
nightly-flatpak:
runs-on: ubuntu-latest
@@ -104,9 +125,7 @@ jobs:
bundle: io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.flatpak
manifest-path: flatpak/io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.yml
cache-key: flatpak-builder-${{ github.sha }}
- uses: softprops/action-gh-release@v2
- uses: actions/upload-artifact@v4
with:
files: io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.flatpak
tag_name: nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: flatpak
path: io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.flatpak

View File

@@ -1,4 +1,4 @@
name: 'publish'
name: "publish"
on:
workflow_dispatch:
@@ -20,14 +20,14 @@ jobs:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04"
args: ""
- platform: "windows-latest"
args: ""
runs-on: ${{ matrix.platform }}
steps:
@@ -47,7 +47,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
cache: "pnpm"
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
@@ -57,69 +57,43 @@ jobs:
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
workspaces: "./src-tauri -> target"
- name: install frontend dependencies
run: pnpm install
- name: Create PKG with post-install script
- name: build Tauri app
run: pnpm run tauri:build -- ${{ matrix.args }}
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
- name: Create PKG with post-install script (macOS only)
if: matrix.platform == 'macos-latest'
run: |
# Create temporary directory for PKG creation
mkdir -p pkg_temp/scripts
cp scripts/postinstall.sh pkg_temp/scripts/
# Build the app first
pnpm tauri build -- ${{ matrix.args }}
# Find the built app
APP_PATH=$(find src-tauri/target/release/bundle/macos/ -name "*.app" | head -1)
MACOS_BUNDLE_DIR=$(find src-tauri/target -path "*/release/bundle/macos" -type d | head -n 1)
APP_PATH=$(find "$MACOS_BUNDLE_DIR" -name "*.app" -type d | head -n 1)
if [ -z "$APP_PATH" ]; then
echo "No .app found in $MACOS_BUNDLE_DIR"
exit 1
fi
APP_NAME=$(basename "$APP_PATH")
# Create PKG with post-install script
pkgbuild --root "$APP_PATH/.." \
--install-location /Applications \
--scripts pkg_temp/scripts \
--identifier "com.emerald.legacy" \
--version "1.0.0" \
--install-location "/Applications" \
--root "$APP_PATH" \
"Emerald-Legacy-Launcher.pkg"
# Move PKG to bundle directory
mkdir -p src-tauri/target/release/bundle/macos/
mv "Emerald-Legacy-Launcher.pkg" src-tauri/target/release/bundle/macos/
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
uploadPlainBinary: true
tagName: v__VERSION__
releaseName: 'Emerald v__VERSION__'
releaseBody: |
# What to download?
- `Emerald.Legacy.Launcher-*.rpm` for GNU/Linux (RHEL)
- `Emerald.Legacy.Launcher-*.deb` for GNU/Linux (Debian+Ubuntu)
- `Emerald.Legacy.Launcher-*.AppImage` for GNU/Linux (Universal, Currently Broken)
- `Emerald.Legacy.Launcher-*_x64.dmg` for macOS (Intel)
- `Emerald.Legacy.Launcher-*_aarch64.dmg` for macOS (M-series)
- `Emerald.Legacy.Launcher-*.exe` for Windows (Setup)
- `Emerald.Legacy.Launcher-*.msi` for Windows (Setup)
- `Emerald.Legacy.Launcher.flatpak` for GNU/Linux (Flatpak, Recommended)
---
# Windows SmartScreen
This software is completely safe. Because the launcher is unsigned, you will see a "Windows protected your PC" window. To proceed:
1. Click the **"More info"** link under the main text.
2. Click the **"Run anyway"** button that appears.
---
# macOS "Damaged" Error Fix
The macOS builds now include automatic fixes for Gatekeeper quarantine issues. The app should launch without "application is damaged" errors.
mv "Emerald-Legacy-Launcher.pkg" "$MACOS_BUNDLE_DIR/"
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}
path: |
src-tauri/target/*/release/bundle/**/*
publish-flatpak:
needs: get-version
@@ -140,9 +114,49 @@ jobs:
bundle: Emerald.Legacy.Launcher.flatpak
manifest-path: flatpak/io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.yml
cache-key: flatpak-builder-${{ github.sha }}
- name: upload flatpak artifact
uses: actions/upload-artifact@v4
with:
name: flatpak
path: Emerald.Legacy.Launcher.flatpak
publish-release:
needs: [get-version, publish-tauri, publish-flatpak]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: "*"
merge-multiple: true
path: artifacts
- uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.get-version.outputs.version }}
files: Emerald.Legacy.Launcher.flatpak
name: "Emerald v${{ needs.get-version.outputs.version }}"
body: |
# What to download?
- `Emerald.Legacy.Launcher-*.rpm` for GNU/Linux (RHEL)
- `Emerald.Legacy.Launcher-*.deb` for GNU/Linux (Debian+Ubuntu)
- `Emerald.Legacy.Launcher-*.AppImage` for GNU/Linux (Universal, Currently Broken)
- `Emerald.Legacy.Launcher-*_x64.dmg` for macOS (Intel)
- `Emerald.Legacy.Launcher-*_aarch64.dmg` for macOS (M-series)
- `Emerald.Legacy.Launcher-*.exe` for Windows (Setup)
- `Emerald.Legacy.Launcher-*.msi` for Windows (Setup)
- `Emerald.Legacy.Launcher.flatpak` for GNU/Linux (Flatpak, Recommended)
---
# Windows SmartScreen
This software is completely safe. Because the launcher is unsigned, you will see a "Windows protected your PC" window. To proceed:
1. Click the **"More info"** link under the main text.
2. Click the **"Run anyway"** button that appears.
---
# macOS "Damaged" Error Fix
The macOS builds now include automatic fixes for Gatekeeper quarantine issues. The app should launch without "application is damaged" errors.
files: artifacts/*
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}