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
119 changes: 119 additions & 0 deletions .github/workflows/build-vento.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Build Vento

on:
workflow_dispatch:
inputs:
tag_name:
description: 'Release tag (e.g., v1.0.0)'
required: true
release_name:
description: 'Release title (e.g., Vento v1.0.0)'
required: true
prerelease:
description: 'Is this a prerelease?'
required: false
default: false
type: boolean
jobs:
build-macos:
runs-on: macos-latest

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'

- name: Cache Electron Builder
uses: actions/cache@v3
with:
path: |
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-electron-builder-

- name: Install Yarn
run: npm install -g yarn

- name: Install dependencies
run: yarn install --immutable

- name: Build macOS App
run: yarn app-package

- name: Create ZIP from DMG
run: |
mkdir -p upload-artifact
cd ../dist
zip -r $GITHUB_WORKSPACE/upload-artifact/Vento-macOS-arm64.zip Vento-*-arm64.dmg

- name: Upload to GitHub Release
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag_name }}
name: ${{ github.event.inputs.release_name }}
prerelease: ${{ github.event.inputs.prerelease }}
files: upload-artifact/Vento-macOS-arm64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-windows:
runs-on: windows-latest

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'

- name: Cache Electron Builder
uses: actions/cache@v3
with:
path: |
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-electron-builder-

- name: Install Yarn
run: npm i -g yarn

- name: Install dependencies
run: yarn install --immutable

- name: Build Electron .exe
run: |
yarn app-package
dir ..\dist\win-unpacked

- name: Copy project to win-unpacked and zip the app
run: |
# Copy project folder to ..\dist\win-unpacked\project
New-Item -ItemType Directory -Force -Path '..\dist\win-unpacked\project'
Copy-Item -Path * -Destination '..\dist\win-unpacked\project' -Recurse -Force
# Create upload-artifact and zip the win-unpacked folder
New-Item -ItemType Directory -Force -Path upload-artifact
Compress-Archive -Path '..\dist\win-unpacked\*' -DestinationPath 'upload-artifact/Vento_Windows.zip'

- name: Upload to GitHub Release
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag_name }}
name: ${{ github.event.inputs.release_name }}
prerelease: ${{ github.event.inputs.prerelease }}
files: upload-artifact/Vento_Windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 3 additions & 2 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ directories:
output: ../dist
mac:
target:
- target: dir
- target: dmg
arch:
- arm64
hardenedRuntime: true
Expand Down Expand Up @@ -36,4 +36,5 @@ files:
- "!.gitignore"
buildDependenciesFromSource: false
npmRebuild: false
afterPack: ./scripts/afterPack.js
afterPack: ./scripts/afterPack.js
publish: null