mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
112 lines
2.6 KiB
YAML
112 lines
2.6 KiB
YAML
name: Release Maestro
|
|
|
|
# This workflow is triggered only by git tags (trusted input)
|
|
# No user-controlled data is executed in shell commands
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
|
include:
|
|
- os: macos-latest
|
|
platform: mac
|
|
- os: ubuntu-latest
|
|
platform: linux
|
|
- os: windows-latest
|
|
platform: win
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build application
|
|
run: npm run build
|
|
|
|
- name: Package for macOS
|
|
if: matrix.platform == 'mac'
|
|
run: npm run package:mac
|
|
env:
|
|
CSC_IDENTITY_AUTO_DISCOVERY: false
|
|
|
|
- name: Package for Windows
|
|
if: matrix.platform == 'win'
|
|
run: npm run package:win
|
|
|
|
- name: Package for Linux
|
|
if: matrix.platform == 'linux'
|
|
run: npm run package:linux
|
|
|
|
- name: Upload macOS artifacts
|
|
if: matrix.platform == 'mac'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: maestro-macos
|
|
path: |
|
|
release/*.dmg
|
|
release/*.zip
|
|
retention-days: 5
|
|
|
|
- name: Upload Windows artifacts
|
|
if: matrix.platform == 'win'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: maestro-windows
|
|
path: |
|
|
release/*.exe
|
|
retention-days: 5
|
|
|
|
- name: Upload Linux artifacts
|
|
if: matrix.platform == 'linux'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: maestro-linux
|
|
path: |
|
|
release/*.AppImage
|
|
release/*.deb
|
|
release/*.rpm
|
|
retention-days: 5
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
artifacts/maestro-macos/*
|
|
artifacts/maestro-windows/*
|
|
artifacts/maestro-linux/*
|
|
draft: false
|
|
prerelease: false
|
|
generate_release_notes: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|