Convert Windows app to Electron and add Android Capacitor app with CI builds
This commit is contained in:
69
.github/workflows/build-electron-app.yml
vendored
Normal file
69
.github/workflows/build-electron-app.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Build Electron Windows App
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- windows-app/**
|
||||
- chat/public/**
|
||||
- .github/workflows/build-electron-app.yml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
name: Build Electron App (Windows)
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: windows-app/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: windows-app
|
||||
|
||||
- name: Build Electron app
|
||||
run: npm run build:win
|
||||
working-directory: windows-app
|
||||
env:
|
||||
BACKEND_BASE_URL: ${{ secrets.BACKEND_BASE_URL }}
|
||||
|
||||
- name: Upload Windows artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shopify-ai-electron-windows
|
||||
path: windows-app/dist/*.exe
|
||||
retention-days: 7
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: electron-app-${{ github.sha }}
|
||||
release_name: ShopifyAI Electron App ${{ github.sha }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: windows-app/dist/ShopifyAI Desktop Setup 0.1.0.exe
|
||||
asset_name: ShopifyAI-Desktop-Setup-0.1.0.exe
|
||||
asset_content_type: application/octet-stream
|
||||
Reference in New Issue
Block a user