mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-07-18 00:07:09 +00:00
ci: use tauri action
This commit is contained in:
parent
91b633d575
commit
d70ab4a128
101
.github/workflows/publish.yml
vendored
101
.github/workflows/publish.yml
vendored
|
|
@ -1,5 +1,4 @@
|
|||
name: "publish"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
|
|
@ -22,16 +21,12 @@ 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-x86_64"
|
||||
- platform: "windows-latest"
|
||||
args: ""
|
||||
artifact-name: "windows-x86_64"
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
|
|
@ -65,40 +60,48 @@ jobs:
|
|||
|
||||
- name: install frontend dependencies
|
||||
run: pnpm install
|
||||
|
||||
- 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)
|
||||
- name: Create PKG with post-install script
|
||||
if: matrix.platform == 'macos-latest'
|
||||
run: |
|
||||
# Create temporary directory for PKG creation
|
||||
mkdir -p pkg_temp/scripts
|
||||
cp scripts/postinstall.sh pkg_temp/scripts/
|
||||
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
|
||||
|
||||
# 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)
|
||||
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.2.1" \
|
||||
--version "1.3.0" \
|
||||
--install-location "/Applications" \
|
||||
--root "$APP_PATH" \
|
||||
"Emerald-Legacy-Launcher.pkg"
|
||||
mv "Emerald-Legacy-Launcher.pkg" "$MACOS_BUNDLE_DIR/"
|
||||
|
||||
- name: upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
# 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:
|
||||
name: ${{ matrix.artifact-name }}
|
||||
path: |
|
||||
src-tauri/target/release/bundle/**/*
|
||||
src-tauri/target/*/release/bundle/**/*
|
||||
uploadPlainBinary: true
|
||||
tagName: v__VERSION__
|
||||
releaseName: "v__VERSION__"
|
||||
releaseBody: |
|
||||
# PLACEHOLDER. CHANGE ME
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
uploadUpdaterJson: true
|
||||
args: ${{ matrix.args }}
|
||||
|
||||
publish-flatpak:
|
||||
needs: get-version
|
||||
|
|
@ -116,52 +119,12 @@ jobs:
|
|||
run: sleep 10
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: Emerald.Legacy.Launcher.flatpak
|
||||
bundle: emerald.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 }}
|
||||
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
|
||||
files: emerald.flatpak
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue