Skip to content

updated package.json to fix workflows #14

updated package.json to fix workflows

updated package.json to fix workflows #14

Workflow file for this run

name: Build and Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.label }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
label: Linux
artifact_name: modular-linux
build_command: npx electron-builder --linux AppImage --publish never
artifact_glob: |
dist/*.AppImage
dist/*.yml
dist/*.blockmap
- os: macos-latest
label: macOS x64
artifact_name: modular-macos-x64
build_command: npx electron-builder --mac dmg zip --x64 --publish never
artifact_glob: |
dist/*.dmg
dist/*.zip
dist/*.yml
dist/*.blockmap
- os: macos-latest
label: macOS arm64
artifact_name: modular-macos-arm64
build_command: npx electron-builder --mac dmg zip --arm64 --publish never
artifact_glob: |
dist/*.dmg
dist/*.zip
dist/*.yml
dist/*.blockmap
- os: windows-2022
label: Windows
artifact_name: modular-windows
build_command: npx electron-builder --win nsis --x64 --publish never
artifact_glob: |
dist/*.exe
dist/*.yml
dist/*.blockmap
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install Linux packaging tools
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y icnsutils graphicsmagick xz-utils rpm
- name: Install dependencies
run: npm ci
- name: Build distributables
run: ${{ matrix.build_command }}
- name: Upload workflow artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_glob }}
if-no-files-found: error
release:
name: Publish GitHub release
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Publish release assets
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
generate_release_notes: true