Update build.yml

This commit is contained in:
Forbirdden 2025-04-17 16:24:39 +05:00 committed by GitHub
parent e895b91741
commit c69548aa64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
name: Build/release name: Release
on: on:
push: push:
@ -6,28 +6,35 @@ on:
- v* - v*
pull_request: pull_request:
branches: branches:
- electron-v3 - main
workflow_dispatch: workflow_dispatch:
jobs: jobs:
release: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [linux-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
steps: steps:
- name: Check out Git repository - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '20.x' node-version: 20.x
- name: Build/release Electron app - name: Install dependencies
uses: samuelmeuli/action-electron-builder@v1.6.0 run: npm ci
with:
github_token: ${{ secrets.github_token }} - name: Build app
release: ${{ startsWith(github.ref, 'refs/tags/v') }} run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: builds-${{ matrix.os }}
path: dist/*