Skip to content

Optimized: Optimized the editor performance. #42

Optimized: Optimized the editor performance.

Optimized: Optimized the editor performance. #42

Workflow file for this run

name: build
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
platform: win
artifact_pattern: 'dist/*.exe'
- os: ubuntu-latest
platform: linux
artifact_pattern: |
dist/*.AppImage
dist/*.deb
dist/*.rpm
- os: macos-latest
platform: mac
artifact_pattern: |
dist/*.dmg
dist/*.zip
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci --prefer-offline --no-audit --no-fund
- name: Build for ${{ matrix.platform }}
run: npm run dist:${{ matrix.platform }} --verbose
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: false
CSC_FOR_PULL_REQUEST: true
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true
USE_HARD_LINKS: false
EP_DRAFT: false
EP_PRE_RELEASE: true
- name: List dist directory (Debug)
run: |
echo "Contents of dist directory:"
ls -R dist/
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: NoteWizard-${{ matrix.platform }}-${{ github.sha }}
path: ${{ matrix.artifact_pattern }}
retention-days: 30
if-no-files-found: warn
update-release-notes:
name: Release Notes
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit --no-fund
- name: Generate Release Notes
run: node scripts/generateReleaseNotes.js ${{ github.ref_name }}
- name: Release Notes
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
body_path: .github/template/RELEASE_NOTES.md
prerelease: true
append_body: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}