Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 98 additions & 2 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
contents: write

jobs:
build:
build-mac:
name: Build - macOS (${{ matrix.arch }})
runs-on: macos-latest

Expand Down Expand Up @@ -95,10 +95,81 @@ jobs:
retention-days: 30
if-no-files-found: error

build-linux:
name: Build - Linux (${{ matrix.arch }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
arch: [x64, arm64]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '1.3.2'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ github.sha }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install --frozen

# Run prebuild and compile steps before electron-builder
- name: Clean dev folder
working-directory: apps/desktop
run: bun run clean:dev

- name: Compile app with electron-vite
working-directory: apps/desktop
run: bun run compile:app

# Build the Electron app for Linux
# Uses --publish never to prevent electron-builder from creating its own release
# The release job handles GitHub release creation
- name: Build Electron app
working-directory: apps/desktop
run: bun run package -- --linux --${{ matrix.arch }} --publish never

# Upload artifacts
- name: Upload AppImage artifact
uses: actions/upload-artifact@v4
with:
name: desktop-linux-${{ matrix.arch }}-appimage
path: apps/desktop/release/*.AppImage
retention-days: 30
if-no-files-found: error

- name: Upload deb artifact
uses: actions/upload-artifact@v4
with:
name: desktop-linux-${{ matrix.arch }}-deb
path: apps/desktop/release/*.deb
retention-days: 30
if-no-files-found: error

- name: Upload auto-update manifest
uses: actions/upload-artifact@v4
with:
name: desktop-linux-${{ matrix.arch }}-update-manifest
path: apps/desktop/release/latest-linux*.yml
retention-days: 30
if-no-files-found: warn

# Create GitHub Release after builds complete
release:
name: Create GitHub Release
needs: build
needs: [build-mac, build-linux]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/desktop-v')

Expand All @@ -116,6 +187,8 @@ jobs:
run: |
cd release-artifacts
# Create stable-named copies (without version) for /releases/latest/download/ URLs

# macOS DMG files
for file in *.dmg; do
if [[ -f "$file" ]]; then
# Extract architecture from filename (e.g., Superset-0.0.1-arm64.dmg -> arm64)
Expand All @@ -124,6 +197,8 @@ jobs:
echo "Created stable copy: Superset-${arch}.dmg"
fi
done

# macOS ZIP files
for file in *-mac.zip; do
if [[ -f "$file" ]]; then
# Extract architecture from filename (e.g., Superset-0.0.1-arm64-mac.zip -> arm64)
Expand All @@ -132,6 +207,27 @@ jobs:
echo "Created stable copy: Superset-${arch}-mac.zip"
fi
done

# Linux AppImage files
for file in *.AppImage; do
if [[ -f "$file" ]]; then
# Extract architecture from filename (e.g., superset-0.0.1-x64.AppImage -> x64)
arch=$(echo "$file" | sed -E 's/.*-([^-]+)\.AppImage$/\1/')
cp "$file" "superset-${arch}.AppImage"
echo "Created stable copy: superset-${arch}.AppImage"
fi
done

# Linux deb files
for file in *.deb; do
if [[ -f "$file" ]]; then
# Extract architecture from filename (e.g., superset-0.0.1-amd64.deb -> amd64)
arch=$(echo "$file" | sed -E 's/.*-([^-]+)\.deb$/\1/')
cp "$file" "superset-${arch}.deb"
echo "Created stable copy: superset-${arch}.deb"
fi
done

echo "Release artifacts:"
ls -la

Expand Down
10 changes: 8 additions & 2 deletions apps/desktop/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,14 @@ else
echo -e "${BLUE}Release URL:${NC} ${RELEASE_URL}"
echo -e "${BLUE}Latest URL:${NC} ${LATEST_URL}"
echo ""
echo -e "${BLUE}Direct download:${NC}"
echo " • ${LATEST_URL}/download/Superset-arm64.dmg"
echo -e "${BLUE}Direct downloads:${NC}"
echo " macOS:"
echo " • ${LATEST_URL}/download/Superset-arm64.dmg"
echo " Linux:"
echo " • ${LATEST_URL}/download/superset-x64.AppImage"
echo " • ${LATEST_URL}/download/superset-arm64.AppImage"
echo " • ${LATEST_URL}/download/superset-amd64.deb"
echo " • ${LATEST_URL}/download/superset-arm64.deb"
echo ""
else
success "Draft release created!"
Expand Down
11 changes: 10 additions & 1 deletion apps/desktop/electron-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,16 @@ const config: Configuration = {
icon: join(pkg.resources, "build/icons"),
category: "Utility",
synopsis: pkg.description,
target: ["AppImage", "deb"],
target: [
{
target: "AppImage",
arch: ["x64", "arm64"],
},
{
target: "deb",
arch: ["x64", "arm64"],
},
],
artifactName: `superset-\${version}-\${arch}.\${ext}`,
},

Expand Down