mirror of
https://github.com/imgfloat/client.git
synced 2026-02-04 19:49:26 +00:00
68 lines
1.4 KiB
YAML
68 lines
1.4 KiB
YAML
name: Electron CI
|
|
|
|
on:
|
|
push:
|
|
branches: ['**']
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- run: npm ci
|
|
|
|
- name: Build (publish only on master)
|
|
shell: bash
|
|
run: |
|
|
if [ "${GITHUB_REF}" = "refs/heads/master" ]; then
|
|
npx electron-builder --publish=always
|
|
else
|
|
npx electron-builder --publish=never
|
|
fi
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
nix-check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: cachix/install-nix-action@v30
|
|
|
|
- name: Evaluate Nix package
|
|
run: |
|
|
nix-instantiate --eval --strict -E 'let pkgs = import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-24.05.tar.gz") {}; in pkgs.callPackage ./nix/imgfloat-client.nix {}' > /dev/null
|
|
|
|
debian-package:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- run: npm ci
|
|
|
|
- name: Build Debian package
|
|
run: npx electron-builder --linux deb --publish=never
|