mirror of
https://github.com/felixrieseberg/windows95.git
synced 2026-05-09 00:24:09 +00:00
The TEMP override in forge.config.js broke Windows builds on CI runners (mkdtemp ENOENT). The expanded diagnostic exercises require() from maker-base's own resolution context to surface the real Linux failure.
111 lines
4.3 KiB
YAML
111 lines
4.3 KiB
YAML
name: Build & Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- v*
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: 20.x
|
|
cache: npm
|
|
- name: Install
|
|
run: npm ci
|
|
- name: lint
|
|
run: npm run lint
|
|
build:
|
|
needs: lint
|
|
name: Build (${{ matrix.os }} - ${{ matrix.arch }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Build for supported platforms
|
|
# https://github.com/electron/electron-packager/blob/ebcbd439ff3e0f6f92fa880ff28a8670a9bcf2ab/src/targets.js#L9
|
|
# 32-bit Linux unsupported as of 2019: https://www.electronjs.org/blog/linux-32bit-support
|
|
os: [ macOS-latest, ubuntu-latest, windows-latest ]
|
|
arch: [ x64, arm64 ]
|
|
include:
|
|
- os: windows-latest
|
|
arch: ia32
|
|
- os: ubuntu-latest
|
|
arch: armv7l
|
|
# Publishing artifacts for multiple Windows architectures has
|
|
# a bug which can cause the wrong architecture to be downloaded
|
|
# for an update, so until that is fixed, only build Windows x64
|
|
exclude:
|
|
- os: windows-latest
|
|
arch: arm64
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: 20.x
|
|
cache: npm
|
|
- name: Set MacOS signing certs
|
|
if: matrix.os == 'macOS-latest'
|
|
run: chmod +x tools/add-macos-cert.sh && ./tools/add-macos-cert.sh
|
|
env:
|
|
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
|
|
MACOS_CERT_PASSWORD: ${{ secrets.MACOS_CERT_PASSWORD }}
|
|
- name: Set Windows signing certificate
|
|
if: matrix.os == 'windows-latest'
|
|
continue-on-error: true
|
|
id: write_file
|
|
uses: timheuer/base64-to-file@784a1a4a994315802b7d8e2084e116e783d157be # v1.2.4
|
|
with:
|
|
fileName: 'win-certificate.pfx'
|
|
encodedString: ${{ secrets.WINDOWS_CODESIGN_P12 }}
|
|
- name: Download disk image (ps1)
|
|
run: tools/download-disk.ps1
|
|
if: matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
DISK_URL: ${{ secrets.DISK_URL }}
|
|
- name: Download disk image (sh)
|
|
run: chmod +x tools/download-disk.sh && ./tools/download-disk.sh
|
|
if: matrix.os != 'windows-latest' && startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
DISK_URL: ${{ secrets.DISK_URL }}
|
|
- name: Install
|
|
run: npm ci
|
|
- name: Diagnose deb maker
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
node -e "const r=require('module').createRequire(require.resolve('@electron-forge/maker-base/package.json'));try{r('electron-installer-debian');console.log('OK from maker-base')}catch(e){console.error('FAIL from maker-base:',e)}"
|
|
node -e "const {MakerDeb}=require('@electron-forge/maker-deb');const m=new MakerDeb({});console.log('isSupported:',m.isSupportedOnCurrentPlatform());try{m.ensureExternalBinariesExist();console.log('binaries OK')}catch(e){console.error('binaries:',e.message)}"
|
|
ls -la node_modules/electron-installer-debian/ || echo "NOT INSTALLED"
|
|
which dpkg fakeroot || echo "missing binaries"
|
|
- name: Make
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: npm run make -- --arch=${{ matrix.arch }}
|
|
env:
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
WINDOWS_CODESIGN_FILE: ${{ steps.write_file.outputs.filePath }}
|
|
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
|
|
- name: Release
|
|
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
draft: true
|
|
files: |
|
|
out/**/*.deb
|
|
out/**/*.dmg
|
|
out/**/*setup*.exe
|
|
out/**/*.rpm
|
|
out/**/*.zip
|