75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
command: npm run electron:build:win
|
|
artifact: release/*.exe
|
|
env:
|
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
|
WIN_CSC_LINK: ''
|
|
- os: macos-latest
|
|
command: npm run electron:build:mac -- --universal
|
|
artifact: release/*.dmg
|
|
env:
|
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
|
- os: ubuntu-latest
|
|
command: npm run electron:build:linux
|
|
artifact: release/*.AppImage
|
|
env:
|
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- run: npm install
|
|
- name: Build (Windows)
|
|
if: matrix.os == 'windows-latest'
|
|
run: ${{ matrix.command }}
|
|
env:
|
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
|
WIN_CSC_LINK: ''
|
|
|
|
- name: Build (mac/linux)
|
|
if: matrix.os != 'windows-latest'
|
|
run: ${{ matrix.command }}
|
|
env:
|
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.os }}-artifacts
|
|
path: ${{ matrix.artifact }}
|
|
if-no-files-found: ignore
|
|
|
|
publish:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Download all build artifacts
|
|
uses: actions/download-artifact@v4
|
|
- name: Aggregate artifacts
|
|
run: |
|
|
mkdir -p release_all
|
|
find . -type f \( -name "*.dmg" -o -name "*.AppImage" -o -name "*.exe" -o -name "*.deb" \) -exec cp {} release_all/ \;
|
|
- name: List aggregated artifacts
|
|
run: ls -la release_all || true
|
|
- name: Create GitHub Release with all artifacts
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: release_all/*
|