Fixed Win/Linux builds
Bumped pnpm Added generic build to run after each commit (feel free to remove)
This commit is contained in:
60
.github/workflows/build.yml
vendored
Normal file
60
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: 🐧 Linux
|
||||||
|
os: ubuntu-latest
|
||||||
|
pnpm_command: 'build:linux'
|
||||||
|
binary_path: dist/*.AppImage
|
||||||
|
asset_name: zeroone.AppImage
|
||||||
|
- name: 🪟 Windows
|
||||||
|
os: windows-latest
|
||||||
|
pnpm_command: 'build:win'
|
||||||
|
binary_path: dist/*.exe
|
||||||
|
asset_name: zeroone.exe
|
||||||
|
- name: 🍏 Mac
|
||||||
|
os: macos-latest
|
||||||
|
pnpm_command: 'build:mac'
|
||||||
|
binary_path: dist/*.dmg
|
||||||
|
asset_name: zeroone.dmg
|
||||||
|
name: ${{ matrix.name }} Build
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: 🚚 Checkout latest code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: 🟩 Use Node.js 20.x
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20.x'
|
||||||
|
|
||||||
|
- name: ⚡ Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4.0.0
|
||||||
|
|
||||||
|
#TODO - Remove this once https://github.com/electron-userland/electron-builder/issues/6933#issuecomment-1213438889 is resolved
|
||||||
|
- name: Tweak pnpm.cjs
|
||||||
|
if: ${{ contains(matrix.os, 'windows') }}
|
||||||
|
run: sed -i 's/\/usr\/bin\/env node/node/g' /c/Users/runneradmin/setup-pnpm/node_modules/.pnpm/pnpm@9.3.0/node_modules/pnpm/bin/pnpm.cjs
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: 🔨 Build Project
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
pnpm i
|
||||||
|
pnpm ${{ matrix.pnpm_command }}
|
||||||
|
|
||||||
|
- name: 📦 Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.asset_name }}
|
||||||
|
path: ${{ matrix.binary_path }}
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@@ -13,10 +13,10 @@ jobs:
|
|||||||
- name: 🐧 Linux
|
- name: 🐧 Linux
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
pnpm_command: 'build:linux'
|
pnpm_command: 'build:linux'
|
||||||
binary_path: dist/*.deb
|
binary_path: dist/*.AppImage
|
||||||
asset_name: zeroone.deb
|
asset_name: zeroone.AppImage
|
||||||
- name: 🪟 Windows
|
- name: 🪟 Windows
|
||||||
os: macos-latest
|
os: windows-latest
|
||||||
pnpm_command: 'build:win'
|
pnpm_command: 'build:win'
|
||||||
binary_path: dist/*.exe
|
binary_path: dist/*.exe
|
||||||
asset_name: zeroone.exe
|
asset_name: zeroone.exe
|
||||||
@@ -44,7 +44,13 @@ jobs:
|
|||||||
node-version: '20.x'
|
node-version: '20.x'
|
||||||
|
|
||||||
- name: ⚡ Setup pnpm
|
- name: ⚡ Setup pnpm
|
||||||
uses: pnpm/action-setup@v3.0.0
|
uses: pnpm/action-setup@v4.0.0
|
||||||
|
|
||||||
|
#TODO - Remove this once https://github.com/electron-userland/electron-builder/issues/6933#issuecomment-1213438889 is resolved
|
||||||
|
- name: Tweak pnpm.cjs
|
||||||
|
if: ${{ contains(matrix.os, 'windows') }}
|
||||||
|
run: sed -i 's/\/usr\/bin\/env node/node/g' /c/Users/runneradmin/setup-pnpm/node_modules/.pnpm/pnpm@9.3.0/node_modules/pnpm/bin/pnpm.cjs
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: 🔨 Build Project
|
- name: 🔨 Build Project
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"description": "Configuration Suite for Binaris Devices",
|
"description": "Configuration Suite for Binaris Devices",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "katbinaris",
|
"author": "katbinaris",
|
||||||
"packageManager": "pnpm@8.14.1",
|
"packageManager": "pnpm@9.3.0",
|
||||||
"homepage": "https://github.com/katbinaris/zeroone",
|
"homepage": "https://github.com/katbinaris/zeroone",
|
||||||
"build": {
|
"build": {
|
||||||
"productName": "ZERO_ONE"
|
"productName": "ZERO_ONE"
|
||||||
|
|||||||
Reference in New Issue
Block a user