Skip to content

Better media management #122

Better media management

Better media management #122

Workflow file for this run

name: Build/release
on:
push:
branches:
- master
pull_request:
branches:
- '*'
tags:
- '*'
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
# - name: Install libvips on Ubuntu
# if: matrix.os == 'ubuntu-latest'
# run: |
# sudo apt-get update
# sudo apt-get install -y libvips-dev
# - name: Install libvips on macOS
# if: matrix.os == 'macos-latest'
# run: |
# brew install vips
# # For Windows, you'd need an equivalent way to install libvips, e.g., using Chocolatey
# # Here's a hypothetical step, but make sure the package exists and is named correctly in Chocolatey
# - name: Install libvips on Windows
# if: matrix.os == 'windows-latest'
# run: |
# # Download the libvips ZIP for Windows (replace with the correct URL!)
# curl -L -o vips.zip https://github.com/libvips/libvips/releases/download/{VERSION}/vips-{VERSION}-win.zip
# # Extract the ZIP
# 7z x vips.zip
# # Optionally, set paths or move binaries as needed
# echo "$(pwd)/vips-{VERSION}-win/bin" >> $GITHUB_PATH
- name: Check out Git repository
uses: actions/checkout@v2.3.4
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version-file: .tool-versions
check-latest: true
- name: Install sharp on ubuntu
if: matrix.os == 'ubuntu-latest'
run: yarn add --arch=x64 --platform=linux sharp
- name: Install sharp on mac
if: matrix.os == 'macos-latest'
run: yarn add --arch=x64 --platform=darwin sharp
- name: Install sharp on windows
if: matrix.os == 'windows-latest'
run: yarn add --arch=x64 --platform=windows sharp
- run: yarn install
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1.6.0
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
args: "-p always"
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}