Skip to content

chore(release): v3.4.1 #31

chore(release): v3.4.1

chore(release): v3.4.1 #31

Workflow file for this run

name: Build & Release
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: win
- os: macos-latest
platform: mac-arm64
arch: arm64
- os: macos-latest
platform: mac-x64
arch: x64
- os: ubuntu-latest
platform: linux
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
env:
ELECTRON_MIRROR: ""
- name: Build
run: pnpm run build
- name: Package for Windows
if: matrix.platform == 'win'
run: npx electron-builder --win --publish never
- name: Package for macOS
if: startsWith(matrix.platform, 'mac')
run: npx electron-builder --mac --${{ matrix.arch }} --publish never
- name: Package for Linux
if: matrix.platform == 'linux'
run: npx electron-builder --linux --publish never
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}
path: |
dist/*.exe
dist/*.dmg
dist/*.zip
dist/*.AppImage
dist/*.yml
dist/*.blockmap
if-no-files-found: error
release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout for release notes
uses: actions/checkout@v4
with:
sparse-checkout: RELEASE_NOTES.md
sparse-checkout-cone-mode: false
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List artifacts
run: find artifacts -type f | head -30
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
draft: false
body_path: RELEASE_NOTES.md
files: |
artifacts/*.exe
artifacts/*.dmg
artifacts/*.zip
artifacts/*.AppImage
artifacts/*.yml
artifacts/*.blockmap