Author SHA1 Message Date
shadowdaoandClaude Opus 5 289cb6d4b1 Add macOS target and put platform in artifact names
Adds a mac zip target (x64 + arm64) so releases cover all three
platforms. Builds unsigned: electron-builder skips code signing when not
running on macOS, so these need the quarantine attribute cleared.

Also puts ${os} in artifactName. Without it the Windows and macOS zips
were both WhatsThatMusic-1.0.0-x64.zip, which collide as release assets
and give no clue which platform they are.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 18:11:31 -07:00
jknapp 9240dc3cb6 Add Linux AppImage build target, app icon, and release workflow (#1) 2026-08-29 00:58:42 +00:00
shadowdaoandClaude Opus 5 be0b62a5ba Add Gitea Actions workflow to build AppImage on tag
Builds the Linux AppImage on a v* tag, runs the test suite first, and
attaches the artifact to a Gitea release via the API (no third-party
action, so nothing needs to be fetched from github.com at runtime).

Guards that the tag matches package.json version: electron-builder names
the artifact from package.json, so tagging v1.0.1 without bumping the
manifest would otherwise publish an AppImage named 1.0.0.

Requires a RELEASE_TOKEN secret and a registered act_runner; neither is
set up yet, so this is inert until both exist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 17:58:19 -07:00
shadowdaoandClaude Opus 5 d8107a06c2 Add Linux AppImage build target and app icon
The build config only had a Windows target. Adds a linux block producing
an AppImage, plus a 512x512 build/icon.png so the packaged app does not
ship with the stock Electron icon.

Verified by running the packaged binary: the embedded server comes up on
9095 and serves the overlay from process.resourcesPath, confirming the
extraResources mapping works in a packaged build.

StartupWMClass is deliberately not set via linux.desktop -- electron-builder
already emits the correct value, and the nested { entry: {...} } form leaks a
literal "entry=[object Object]" line into the .desktop file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 17:54:05 -07:00
3 changed files with 93 additions and 1 deletions
+72
View File
@@ -0,0 +1,72 @@
name: Build AppImage
# Builds the Linux AppImage on a version tag and attaches it to a Gitea release.
# Tag must match the version in desktop-client/package.json, since electron-builder
# names the artifact from package.json (not from the tag).
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
appimage:
runs-on: ubuntu-latest
defaults:
run:
working-directory: desktop-client
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Verify tag matches package.json version
if: startsWith(github.ref, 'refs/tags/v')
run: |
pkg_version=$(node -p "require('./package.json').version")
tag_version="${GITHUB_REF_NAME#v}"
if [ "$pkg_version" != "$tag_version" ]; then
echo "Tag $GITHUB_REF_NAME does not match package.json version $pkg_version." >&2
echo "Bump package.json before tagging, or the AppImage will be misnamed." >&2
exit 1
fi
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build AppImage
run: npx electron-builder --linux AppImage --publish never
- name: Attach AppImage to release
if: startsWith(github.ref, 'refs/tags/v')
env:
TOKEN: ${{ secrets.RELEASE_TOKEN }}
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
run: |
set -euo pipefail
artifact=$(ls dist/*.AppImage | head -1)
echo "Publishing $artifact for $GITHUB_REF_NAME"
# Reuse the release if the tag already has one, otherwise create it.
release_id=$(curl -sf -H "Authorization: token $TOKEN" \
"$API/releases/tags/$GITHUB_REF_NAME" | node -p \
"JSON.parse(require('fs').readFileSync(0,'utf8')).id" 2>/dev/null || true)
if [ -z "${release_id:-}" ]; then
release_id=$(curl -sf -X POST -H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"$GITHUB_REF_NAME\",\"name\":\"$GITHUB_REF_NAME\"}" \
"$API/releases" | node -p \
"JSON.parse(require('fs').readFileSync(0,'utf8')).id")
fi
curl -sf -X POST -H "Authorization: token $TOKEN" \
-F "attachment=@$artifact" \
"$API/releases/$release_id/assets?name=$(basename "$artifact")" \
-o /dev/null
echo "Attached $(basename "$artifact") to release $release_id"
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

+21 -1
View File
@@ -16,7 +16,10 @@
"!tests/**"
],
"extraResources": [
{ "from": "../overlay", "to": "overlay" }
{
"from": "../overlay",
"to": "overlay"
}
],
"extraMetadata": {
"main": "index.js"
@@ -26,6 +29,23 @@
"sign": false,
"signAndEditExecutable": false,
"certificateSubjectName": null
},
"linux": {
"target": [
"AppImage"
],
"icon": "build/icon.png",
"category": "AudioVideo",
"synopsis": "YouTube Music player with a now-playing overlay for OBS",
"maintainer": "What's That Music"
},
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"mac": {
"target": [
"zip"
],
"icon": "build/icon.png",
"category": "public.app-category.music"
}
},
"dependencies": {