Skip to content

Commit

Permalink
build: update yml with from electron-vite
Browse files Browse the repository at this point in the history
  • Loading branch information
2xAA committed Aug 19, 2024
1 parent 7eb8e76 commit 3a84d7d
Showing 1 changed file with 49 additions and 64 deletions.
113 changes: 49 additions & 64 deletions .github/workflows/build-electron.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,62 @@
name: Build Electron

on:
workflow_dispatch:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

env:
ELECTRON_CACHE: $HOME/.cache/electron
ELECTRON_BUILDER_CACHE: $HOME/.cache/electron-builder
USE_HARD_LINKS: false
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- *.*.*

jobs:
build-windows:
name: Build Windows
runs-on: windows-latest
env:
YARN_GPG: no
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "20.x"

- name: Install dependencies
run: yarn install --frozen-lockfile
release:
runs-on: ${{ matrix.os }}

- name: Build Windows
run: yarn run build:win
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

build-macOS:
name: Build macOS
runs-on: macos-latest
environment: build
env:
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check out Git repository
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v1
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "20.x"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build macOS
run: yarn run build:mac

build-ubuntu:
name: Build Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
node-version: 16

- name: Install Dependencies
run: npm install

- name: build-linux
if: matrix.os == 'ubuntu-latest'
run: npm run build:linux

- name: build-mac
if: matrix.os == 'macos-latest'
run: npm run build:mac
env:
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}

- name: build-win
if: matrix.os == 'windows-latest'
run: npm run build:win

- name: release
uses: softprops/action-gh-release@v1
with:
node-version: "20.x"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build ubuntu
run: yarn run build:linux
draft: true
files: |
dist/*.exe
dist/*.zip
dist/*.dmg
dist/*.AppImage
dist/*.snap
dist/*.deb
dist/*.rpm
dist/*.tar.gz
dist/*.yml
dist/*.blockmap
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

0 comments on commit 3a84d7d

Please sign in to comment.