Release #52
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: Release | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
release-id: | |
type: string | |
description: Optional release-id (only used when running worklfow manually) | |
jobs: | |
release-app: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: "macos-latest" # for Arm based macs (M1 and above). | |
args: "--target aarch64-apple-darwin" | |
- platform: "macos-latest" # for Intel based macs. | |
args: "--target x86_64-apple-darwin" | |
- platform: "ubuntu-22.04" | |
args: "" | |
- platform: "windows-latest" | |
args: "" | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
apps/core | |
crates | |
packages | |
scripts | |
.github/actions | |
- name: Checkout MetaX's repo | |
uses: actions/checkout@v4 | |
with: | |
repository: kareemmahlees/meta-x | |
path: apps/meta-x | |
- 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: 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 | |
- name: Setup Node & PNPM | |
uses: ./.github/actions/setup-node-pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lock | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
cache: true | |
cache-dependency-path: "**/go.sum" | |
go-version: "stable" | |
- name: Build MetaX | |
run: go build -C ./apps/meta-x/ -o ../bin/ -ldflags "-w -s" | |
- name: Prepare MetaX (windows) | |
if: matrix.platform == 'windows-latest' | |
run: ./scripts/prepare_metax.ps1 | |
- name: Prepare MetaX (mac, linux) | |
if: matrix.platform != 'windows-latest' | |
run: | | |
chmod +x ./scripts/prepare_metax.sh | |
./scripts/prepare_metax.sh | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
releaseId: ${{ github.event.release.id || github.event.inputs.release-id }} | |
projectPath: ./apps/core | |
tauriScript: pnpm tauri | |
args: --config src-tauri/tauri.conf.sidecar.json --features metax ${{ matrix.args }} |