Files
moeka-project/.github/workflows/build-tamagotchi.yml
T

92 lines
2.8 KiB
YAML

name: Build Tamagotchi
permissions:
contents: write
on:
workflow_dispatch:
inputs:
tag:
description: Attach to a specific tag/commit for the release
required: true
type: string
jobs:
build-tamagotchi:
name: Build Tamagotchi
strategy:
matrix:
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Product Name
run: |
echo "PRODUCT_NAME=$(jq -r '.productName' apps/stage-tamagotchi/src-tauri/tauri.conf.json)" >> $GITHUB_ENV
- name: Debug Environment
run: |
echo "PRODUCT_NAME: '${{ env.PRODUCT_NAME }}'"
ls -la bundle/ || echo "bundle directory doesn't exist"
find . -name "*setup.exe" -o -name "*.AppImage" -o -name "*.dmg" || echo "No artifacts found"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install Node.js 24.x
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 24.x
# registry-url required. Learn more at
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
registry-url: https://registry.npmjs.org
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: install system dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Dependencies
run: pnpm run build:packages
- name: Build Application
run: cd apps/stage-tamagotchi && pnpm tauri build --target ${{ matrix.target }}
- name: Rename Artifacts
run: node apps/stage-tamagotchi/scripts/rename-artifacts.js ${{ matrix.target }}
- name: Debug After Rename
run: |
ls -la bundle/ || echo "bundle directory doesn't exist after rename"
- name: Upload To GitHub Releases
uses: softprops/action-gh-release@v2
with:
files: bundle/${{ env.PRODUCT_NAME }}_*
append_body: true
tag_name: ${{ github.event.inputs.tag }}