mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-12 05:10:51 +02:00
fix runner
This commit is contained in:
@@ -3,14 +3,11 @@ name: Build Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
artifact_label:
|
||||
description: Optional label appended to the artifact name
|
||||
version_tag:
|
||||
description: 'Version label for the build (e.g. alpha-1, beta-2)'
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on ${{ matrix.os }}
|
||||
@@ -21,15 +18,8 @@ jobs:
|
||||
include:
|
||||
- os: macos-latest
|
||||
dist_cmd: dist:mac
|
||||
artifact_name: prism-macos
|
||||
- os: windows-latest
|
||||
dist_cmd: dist:win
|
||||
artifact_name: prism-windows
|
||||
|
||||
env:
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
||||
ELECTRON_CACHE: ${{ runner.temp }}/electron-cache
|
||||
ELECTRON_BUILDER_CACHE: ${{ runner.temp }}/electron-builder-cache
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -38,42 +28,43 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.x
|
||||
cache: npm
|
||||
cache: 'npm'
|
||||
|
||||
- name: Cache Electron
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ env.ELECTRON_CACHE }}
|
||||
${{ env.ELECTRON_BUILDER_CACHE }}
|
||||
key: ${{ runner.os }}-electron-cache-${{ hashFiles('package-lock.json') }}
|
||||
~/.cache/electron
|
||||
~/.cache/electron-builder
|
||||
key: ${{ runner.os }}-electron-cache
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build native module
|
||||
- name: Build native DSP module
|
||||
run: npm run rebuild:native
|
||||
|
||||
- name: Verify native module exists
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -f native/build/Release/visualizer_dsp.node ]; then
|
||||
echo "ERROR: native DSP module was not built"
|
||||
echo "ERROR: native DSP module was not built!"
|
||||
exit 1
|
||||
fi
|
||||
echo "Native module built successfully:"
|
||||
ls -lh native/build/Release/visualizer_dsp.node
|
||||
echo "Native module built successfully: $(ls -lh native/build/Release/visualizer_dsp.node)"
|
||||
|
||||
- name: Build distributable
|
||||
run: npm run ${{ matrix.dist_cmd }}
|
||||
env:
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.artifact_name }}${{ inputs.artifact_label && format('-{0}', inputs.artifact_label) || '' }}
|
||||
name: prism-${{ runner.os }}${{ inputs.version_tag && format('-{0}', inputs.version_tag) || '' }}
|
||||
path: |
|
||||
dist/*.exe
|
||||
dist/*.dmg
|
||||
dist/*.zip
|
||||
dist/*.exe
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
|
||||
Reference in New Issue
Block a user