Files
itsRevela ded271f410 chore: centralize version management and bump to 1.1.4
Add bump script (pnpm bump <version>) that updates package.json,
tauri.conf.json, Cargo.toml, and README in one command. CI workflows
now read the version from package.json dynamically. App.tsx reads
the version via Vite define instead of hardcoding it.
2026-04-15 03:37:13 -05:00

284 lines
12 KiB
YAML

name: 'publish'
on:
workflow_dispatch:
jobs:
publish-tauri:
permissions:
contents: write
strategy:
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: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: install frontend dependencies
run: pnpm install
- name: Create PKG with post-install script
if: matrix.platform == 'macos-latest'
run: |
APP_VERSION=$(node -p "require('./package.json').version")
# 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)
APP_NAME=$(basename "$APP_PATH")
# Create PKG with post-install script
pkgbuild --root "$APP_PATH/.." \
--install-location /Applications \
--scripts pkg_temp/scripts \
--identifier "com.revelations.lce" \
--version "$APP_VERSION" \
--install-location "/Applications" \
--root "$APP_PATH" \
"Revelations-Launcher.pkg"
# Move PKG to bundle directory
mkdir -p src-tauri/target/release/bundle/macos/
mv "Revelations-Launcher.pkg" src-tauri/target/release/bundle/macos/
- name: Build and create DMG for macOS
if: matrix.platform == 'macos-latest'
run: |
APP_VERSION=$(node -p "require('./package.json').version")
pnpm build
cd src-tauri
cargo build --release --target ${{ matrix.args }}
cd ..
TARGET_ARCH=${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}
mkdir -p "src-tauri/target/$TARGET_ARCH/release/bundle/macos/Revelations Launcher.app/Contents/MacOS"
mkdir -p "src-tauri/target/$TARGET_ARCH/release/bundle/macos/Revelations Launcher.app/Contents/Resources"
cp "src-tauri/target/$TARGET_ARCH/release/revelations-launcher" "src-tauri/target/$TARGET_ARCH/release/bundle/macos/Revelations Launcher.app/Contents/MacOS/"
printf '<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n<dict>\n <key>CFBundleExecutable</key>\n <string>revelations-launcher</string>\n <key>CFBundleIdentifier</key>\n <string>com.revelations.lce</string>\n <key>CFBundleName</key>\n <string>Revelations Launcher</string>\n <key>CFBundleVersion</key>\n <string>'"$APP_VERSION"'</string>\n <key>CFBundleShortVersionString</key>\n <string>'"$APP_VERSION"'</string>\n <key>CFBundlePackageType</key>\n <string>APPL</string>\n <key>NSHighResolutionCapable</key>\n <true/>\n <key>LSApplicationCategoryType</key>\n <string>public.app-category.games</string>\n</dict>\n</plist>\n' > "src-tauri/target/$TARGET_ARCH/release/bundle/macos/Revelations Launcher.app/Contents/Info.plist"
if [ -f "src-tauri/icons/icon.icns" ]; then
cp src-tauri/icons/icon.icns "src-tauri/target/$TARGET_ARCH/release/bundle/macos/Revelations Launcher.app/Contents/Resources/"
fi
chmod +x "src-tauri/target/$TARGET_ARCH/release/bundle/macos/Revelations Launcher.app/Contents/MacOS/revelations-launcher"
cd "src-tauri/target/$TARGET_ARCH/release/bundle/macos"
hdiutil create -volname "Revelations Launcher" -srcfolder "Revelations Launcher.app" -ov -format UDZO "Revelations Launcher.dmg"
mkdir -p "$GITHUB_WORKSPACE/src-tauri/target/release/bundle/dmg/"
mv "Revelations Launcher.dmg" "$GITHUB_WORKSPACE/src-tauri/target/release/bundle/dmg/"
- name: Build with tauri-action for Windows and Linux
if: matrix.platform != 'macos-latest'
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NO_STRIP: ${{ matrix.platform == 'ubuntu-22.04' && 'true' || '' }}
with:
tagName: v__VERSION__
releaseName: 'Revelations v__VERSION__'
releaseBody: |
# Revelations Launcher v__VERSION__
## 📥 What to download?
### 🐧 GNU/Linux
- **RHEL/Fedora**: `Revelations.Launcher-*.rpm`
- **Debian/Ubuntu**: `Revelations.Launcher-*.deb`
- **Universal**: `Revelations.Launcher-*.AppImage`
- **Flatpak**: `io.github.itsRevela.Revelations_Launcher.flatpak`
### 🍎 macOS
- **Intel Mac**: `Revelations.Launcher_*.x64.dmg`
- **M-series Mac**: `Revelations.Launcher_*.aarch64.dmg`
### 🪟 Windows
- **Setup Installer**: `Revelations.Launcher-*.exe`
- **MSI Installer**: `Revelations.Launcher-*.msi`
---
## ⚠️ 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 Installation
Download the DMG file, open it, and drag the app to Applications folder.
If you see "app damaged" error, right-click the app → Open → confirm Open.
Or run: `xattr -cr "/Applications/Revelations Launcher.app"`
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
- name: Upload all artifacts to release
if: matrix.platform != 'macos-latest'
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/rpm/*.rpm
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
tag_name: v__VERSION__
name: 'Revelations v__VERSION__'
body: |
# Revelations Launcher v__VERSION__
## 📥 What to download?
### 🐧 GNU/Linux
- **RHEL/Fedora**: `Revelations.Launcher-*.rpm`
- **Debian/Ubuntu**: `Revelations.Launcher-*.deb`
- **Universal**: `Revelations.Launcher-*.AppImage`
- **Flatpak**: `io.github.itsRevela.Revelations_Launcher.flatpak`
### 🍎 macOS
- **Intel Mac**: `Revelations.Launcher_*.x64.dmg`
- **M-series Mac**: `Revelations.Launcher_*.aarch64.dmg`
### 🪟 Windows
- **Setup Installer**: `Revelations.Launcher-*.exe`
- **MSI Installer**: `Revelations.Launcher-*.msi`
---
## ⚠️ 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 Installation
Download the DMG file, open it, and drag the app to Applications folder.
If you see "app damaged" error, right-click the app → Open → confirm Open.
Or run: `xattr -cr "/Applications/Revelations Launcher.app"`
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS DMGs to release
if: matrix.platform == 'macos-latest'
uses: softprops/action-gh-release@v2
with:
files: src-tauri/target/release/bundle/dmg/*.dmg
tag_name: v__VERSION__
name: 'Revelations v__VERSION__'
body: |
# Revelations Launcher v__VERSION__
## 📥 What to download?
### 🐧 GNU/Linux
- **RHEL/Fedora**: `Revelations.Launcher-*.rpm`
- **Debian/Ubuntu**: `Revelations.Launcher-*.deb`
- **Universal**: `Revelations.Launcher-*.AppImage`
- **Flatpak**: `io.github.itsRevela.Revelations_Launcher.flatpak`
### 🍎 macOS
- **Intel Mac**: `Revelations.Launcher_*.x64.dmg`
- **M-series Mac**: `Revelations.Launcher_*.aarch64.dmg`
### 🪟 Windows
- **Setup Installer**: `Revelations.Launcher-*.exe`
- **MSI Installer**: `Revelations.Launcher-*.msi`
---
## ⚠️ 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 Installation
Download the DMG file, open it, and drag the app to Applications folder.
If you see "app damaged" error, right-click the app → Open → confirm Open.
Or run: `xattr -cr "/Applications/Revelations Launcher.app"`
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-flatpak:
runs-on: ubuntu-latest
permissions:
contents: write
needs: publish-tauri
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder
- name: setup flathub
run: |
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install -y flathub org.gnome.Sdk//48 org.gnome.Platform//48 org.freedesktop.Sdk.Extension.node20//24.08 org.freedesktop.Sdk.Extension.rust-stable//24.08
sudo flatpak update
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: io.github.itsRevela.Revelations_Launcher.flatpak
manifest-path: flatpak/io.github.itsRevela.Revelations_Launcher.yml
cache-key: flatpak-builder-${{ github.sha }}
build-bundle: true
repository-url: https://flathub.org/repo/flathub.flatpakrepo
repository-name: flathub
- uses: softprops/action-gh-release@v2
with:
files: io.github.itsRevela.Revelations_Launcher.flatpak
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}