Skip to content

Package for distribution #15

Package for distribution

Package for distribution #15

Workflow file for this run

name: Package for distribution
on: workflow_dispatch
env:
CSC_IDENTITY_AUTO_DISCOVERY: false
jobs:
package:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-20.04, macos-latest]
# OS-specific commands/variables
include:
- os: ubuntu-20.04
cmd_package: npm run package-linux
out_filename: Bob-linux
- os: windows-latest
cmd_package: npm run package-win
out_filename: Bob-windows
- os: macos-latest
cmd_package: npm run package-mac
out_filename: Bob-macos-intel
runs-on: ${{matrix.os}}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
# https://github.com/actions/setup-node/issues/280#issuecomment-1139455898
- name: Update node-gyp (windows only)
if: startsWith(matrix.os, 'windows')
run: |
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
$NodeDirPath = Split-Path $WhereNode -Parent
$NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\@npmcli\run-script"
cd $NodeModulesPath
npm install node-gyp@latest
- name: Install dependencies (linux only)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt update && sudo apt install libudev-dev libusb-1.0-0-dev -y
- name: Install npm packages
run: npm i
- name: Install dmg-license (macos only)
if: startsWith(matrix.os, 'macos')
run: npm i dmg-license --no-save
- name: Generate Executable
run: ${{ matrix.cmd_package }}
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.out_filename }}
path: |
release/*.AppImage
release/*.msi
release/*.dmg