Skip to content

Release v2.4.12 — fix GoldHEN/2121 directory listing (MLSD->LIST) + p… #11

Release v2.4.12 — fix GoldHEN/2121 directory listing (MLSD->LIST) + p…

Release v2.4.12 — fix GoldHEN/2121 directory listing (MLSD->LIST) + p… #11

Workflow file for this run

name: Build All Platforms
on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v2.1.0) — must already exist in Releases'
required: true
default: 'v2.1.0'
push:
tags:
- 'v*'
jobs:
# ── Prepare ───────────────────────────────────────────────────────────────────
# Delete any pre-existing release for this tag so the platform jobs upload into a
# clean slate (no stale/duplicate assets from a previous run). The tag itself is
# preserved. No-ops on a brand-new version. Uses the runner's built-in gh + token.
prepare:
name: Prepare clean release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Delete existing release for this tag (keep tag)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ github.event.inputs.tag || github.ref_name }}"
gh release delete "$TAG" --repo "${{ github.repository }}" --yes \
&& echo "Deleted existing release $TAG" \
|| echo "No existing release for $TAG — nothing to clean"
# ── Windows ─────────────────────────────────────────────────────────────────
build-windows:
name: Build Windows (Portable EXE)
runs-on: windows-latest
needs: prepare
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Windows portable EXE
run: npx electron-builder --win portable --x64 --publish never
- name: Upload Windows artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: |
dist/*.exe
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ── macOS ────────────────────────────────────────────────────────────────────
build-macos:
name: Build macOS (DMG — x64 + arm64)
runs-on: macos-latest
needs: prepare
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build macOS DMG (x64 + arm64)
run: npx electron-builder --mac dmg --x64 --arm64 --publish never
env:
CSC_IDENTITY_AUTO_DISCOVERY: false # no Apple cert in CI — skip codesigning
- name: Upload macOS artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: |
dist/*.dmg
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ── Linux ────────────────────────────────────────────────────────────────────
build-linux:
name: Build Linux (AppImage)
runs-on: ubuntu-latest
needs: prepare
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install Linux build dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y \
libgtk-3-dev \
libxss1 \
libasound2-dev \
libgbm-dev \
libxtst6 \
libnss3-dev \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libpango-1.0-0 \
libcairo2 \
fuse
- name: Install dependencies
run: npm ci
- name: Build Linux AppImage (x64)
run: npx electron-builder --linux AppImage --x64 --publish never
- name: Upload Linux artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: |
dist/*.AppImage
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}