Skip to content

Release v1.6.1

Release v1.6.1 #10

Workflow file for this run

name: release
# Build Electron installers for Windows, macOS and Linux (x64 + arm64).
# No native modules => both arches build per OS runner.
# Trigger manually (Actions > release > Run workflow) or by pushing a v* tag.
on:
workflow_dispatch:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { name: linux, os: ubuntu-latest, platform: '--linux' }
- { name: windows, os: windows-latest, platform: '--win' }
- { name: macos, os: macos-14, platform: '--mac' }
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Compile (electron-vite)
run: npx electron-vite build
- name: Package (electron-builder)
run: npx electron-builder ${{ matrix.platform }} --x64 --arm64 --publish never
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build macOS .pkg installers
if: runner.os == 'macOS'
shell: bash
# electron-builder's pkg target is not concurrency-safe: every
# architecture writes the same scratch distribution.xml and
# <appId>.pkg into the output dir, so two arches in flight make one run
# delete what the other is reading. Build them here instead, one at a
# time, with the same helper the rest of the fleet uses.
run: |
source scripts/release-lib.sh
version="$(node -p "require('./package.json').version")"
rl_init "PDF Presenter Lite" pdf-presenter-lite "$version" \
com.stoatworks.pdf-presenter-lite "$PWD/dist"
for d in dist/mac dist/mac-arm64 dist/mac-universal; do
[ -d "$d" ] || continue
app="$(cd "$d" && ls -d *.app 2>/dev/null | head -1)"
[ -n "$app" ] || continue
case "$(basename "$d")" in
mac) arch=x64 ;;
mac-arm64) arch=arm64 ;;
mac-universal) arch=universal ;;
esac
rl_pkg "macos-${arch}" "$d" --app "$app"
done
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: pdf-presenter-lite-${{ matrix.name }}
path: |
dist/*.exe
dist/*.dmg
dist/*.pkg
dist/*.zip
dist/*.deb
dist/*.rpm
dist/*.AppImage
if-no-files-found: error
release:
name: Publish release
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
with:
path: artifacts
- uses: softprops/action-gh-release@v3
with:
files: artifacts/**/*
generate_release_notes: true