Skip to content

Update package.json #17

Update package.json

Update package.json #17

Workflow file for this run

name: Build Electron App
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Clear Electron Builder Cache
run: rm -rf $HOME/.cache/electron-builder
- name: Install dependencies
run: npm install
- name: Package the app for Linux, Windows, and macOS
run: |
# Build for Linux, Windows, and macOS without publishing
npx electron-builder --linux AppImage --win nsis --mac dmg -p never
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} # Use your GitHub token with write permissions
- name: Upload Release Assets
uses: ncipollo/release-action@v1
with:
tag: 'v${{ github.run_number }}'
name: 'TheCyberHUB Desktop Release v${{ github.run_number }}'
files: |
dist/*.AppImage
dist/*.exe
dist/*.dmg
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional: Clean up after the build
- name: Cleanup
run: |
echo "Cleaning up build artifacts"
rm -rf dist