Skip to content

Merge branch 'dev'

Merge branch 'dev' #24

Workflow file for this run

name: Build the Electron version of Magrit
on:
push:
tags:
- "v*.*.*"
jobs:
build-linux-windows:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Mono and Wine
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y wine64 wine32 mono-complete
- name: Install dependencies
run: npm install
- name: Build application and create distribution
run: npm run build:electron
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Read version from package.json
id: get_version
run: echo "::set-output name=version::$(node -p -e "require('./package.json').version")"
- name: Upload .exe artifacts
uses: actions/upload-artifact@v4
with:
name: windows-build
path: release/${{ steps.get_version.outputs.version }}/*.exe
- name: Upload .AppImage artifacts
uses: actions/upload-artifact@v4
with:
name: linux-build
path: release/${{ steps.get_version.outputs.version }}/*.AppImage
- name: Upload Artifacts to Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/${{ steps.get_version.outputs.version }}/Magrit-Windows-${{ steps.get_version.outputs.version }}-portable.exe
release/${{ steps.get_version.outputs.version }}/Magrit-Linux-${{ steps.get_version.outputs.version }}.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macos-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Build application and create distribution
run: npm run build:electron-mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Read version from package.json
id: get_version
run: echo "::set-output name=version::$(node -p -e "require('./package.json').version")"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-build
path: release/${{ steps.get_version.outputs.version }}/*.dmg
- name: Upload macOS Artifacts to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/${{ steps.get_version.outputs.version }}/Magrit-Mac-${{ steps.get_version.outputs.version }}-Installer.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}