Skip to content

release v0.1.6

release v0.1.6 #6

name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install native dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libnss3-dev libatk-bridge2.0-dev libdrm2 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libxss1 libasound2-dev
- name: Rebuild native dependencies
run: npx electron-rebuild
- name: Build application
run: npm run dist
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Ad hoc code signing (macOS)
if: matrix.os == 'macos-latest'
run: |
# Find the built app
APP_PATH=$(find dist -name "*.app" -type d | head -1)
if [ -n "$APP_PATH" ]; then
echo "Applying ad hoc signature to: $APP_PATH"
# Sign all frameworks and helpers first
find "$APP_PATH" -name "*.framework" -o -name "*.app" | while read framework; do
echo "Signing: $framework"
codesign --remove-signature "$framework" 2>/dev/null || true
codesign --force --sign - "$framework" || echo "Failed to sign: $framework"
done
# Sign the main app bundle
codesign --remove-signature "$APP_PATH" || true
codesign --force --deep --sign - "$APP_PATH"
echo "Ad hoc signature applied successfully"
# Verify signature
codesign --verify --verbose "$APP_PATH" || echo "Signature verification failed"
else
echo "No .app bundle found in dist directory"
fi
- name: Upload artifacts (macOS)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: macos-build
path: |
dist/*.dmg
dist/*.zip
- name: Upload artifacts (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: windows-build
path: |
dist/*.exe
dist/*.msi
- name: Upload artifacts (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: linux-build
path: |
dist/*.AppImage
dist/*.deb
dist/*.rpm
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Display structure of downloaded files
run: ls -la artifacts/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/**/*
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}