Skip to content

Merge branch 'main' into deploy #16

Merge branch 'main' into deploy

Merge branch 'main' into deploy #16

Workflow file for this run

name: Build and Release
on:
push:
branches:
- deploy
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.version.outputs.VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get version
id: version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.VERSION }}
release_name: Palet AI v${{ steps.version.outputs.VERSION }}
body: |
## Palet AI v${{ steps.version.outputs.VERSION }}
### Features
- 🎯 ChatGPT, Gemini, Perplexity, Claude AI support
- 🔑 **No API key needed** - Just login and use
- 🚀 Multiple AI services in one app
- 🎨 Dark and minimalist UI
- 📱 Maximum 4 services selection
- ⌨️ App-only zoom shortcuts (Cmd +/-)
### Downloads
- **macOS (ARM64)**: `palet-ai-macOS-arm64.zip` - Apple Silicon (M1/M2/M3)
- **Windows (x86/x64)**: `Palet-AI-Setup.exe` - Portable installer for Windows
### Installation Notes
**macOS:**
- Recommended: Install via Homebrew `brew install --cask cha2hyun/tap/palet-ai`
- Or download directly and run: `xattr -cr ~/Downloads/Palet\ AI.app`
**Windows:**
- Download `Palet-AI-Setup.exe` and run it
- No installation required - it's a portable app
draft: false
prerelease: false
build-mac:
needs: create-release
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: yarn install
- name: Build Mac ARM64
run: yarn dist:mac:arm64
- name: Fix Permissions
run: |
chmod -R +x "dist/mac-arm64/Palet AI.app/Contents/MacOS"
xattr -cr "dist/mac-arm64/Palet AI.app"
- name: Zip Mac App
run: |
cd dist/mac-arm64
zip -r -y ../../palet-ai-macOS-arm64.zip "Palet AI.app"
cd ../..
- name: Upload Mac ARM64 App
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./palet-ai-macOS-arm64.zip
asset_name: palet-ai-macOS-arm64.zip
asset_content_type: application/zip
build-windows:
needs: create-release
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: yarn install
- name: Build Windows
run: yarn dist:win
- name: Rename Windows installer
run: |
$version = node -p "require('./package.json').version"
Move-Item "dist/Palet AI $version.exe" "dist/Palet-AI-Setup.exe"
- name: Upload Windows Installer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./dist/Palet-AI-Setup.exe
asset_name: Palet-AI-Setup.exe
asset_content_type: application/octet-stream
update-homebrew-tap:
needs: [create-release, build-mac, build-windows]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get version
id: version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Download release asset
run: |
curl -L -o palet-ai-macOS-arm64.zip \
"https://github.com/cha2hyun/palet-ai/releases/download/v${{ steps.version.outputs.VERSION }}/palet-ai-macOS-arm64.zip"
- name: Calculate SHA256
id: sha256
run: |
SHA256=$(shasum -a 256 palet-ai-macOS-arm64.zip | awk '{print $1}')
echo "SHA256=${SHA256}" >> $GITHUB_OUTPUT
echo "Calculated SHA256: ${SHA256}"
- name: Checkout homebrew-tap
uses: actions/checkout@v4
with:
repository: cha2hyun/homebrew-tap
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
path: homebrew-tap
- name: Update Cask formula
run: |
cd homebrew-tap
sed -i "s/version \".*\"/version \"${{ steps.version.outputs.VERSION }}\"/" Casks/palet-ai.rb
sed -i "s/sha256 \".*\"/sha256 \"${{ steps.sha256.outputs.SHA256 }}\"/" Casks/palet-ai.rb
echo "Updated Cask formula:"
head -10 Casks/palet-ai.rb
- name: Commit and push
run: |
cd homebrew-tap
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Casks/palet-ai.rb
git commit -m "chore: Update palet-ai to v${{ steps.version.outputs.VERSION }}"
git push