Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build

on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
script: build:linux
artifact: linux
paths: |
dist/*.AppImage
dist/*.deb
dist/*.rpm
- os: windows-latest
script: build:win
artifact: windows
paths: |
dist/*.exe
- os: macos-latest
script: build:mac
artifact: macos
paths: |
dist/*.dmg
dist/*.zip

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Build
run: npm run ${{ matrix.script }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent builder from publishing in the build matrix

On release events this matrix build runs on the tag ref, and passing GH_TOKEN enables electron-builder's implicit GitHub publishing (its v26 docs state that when GH_TOKEN/GITHUB_TOKEN is defined, GitHub is the default publisher and CI tag builds publish). That makes each OS build try to upload release assets before the dedicated release job, which can fail in repos where this build job's token is read-only or duplicate the assets that softprops/action-gh-release uploads; remove the token/use --publish never in the build step and publish only in the release job.

Useful? React with 👍 / 👎.


- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: fsprinter-${{ matrix.artifact }}
path: ${{ matrix.paths }}
if-no-files-found: error

release:
name: Publish release
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v7
with:
path: artifacts

- name: Create GitHub release
uses: softprops/action-gh-release@v3
with:
files: artifacts/**/*
generate_release_notes: true
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/nbproject/
/node_modules/
/vendor/
/out/
/dist/
package-lock.json
pos.txt
out/
ticket
*.lock
.DS_Store
.DS_Store
.idea
.codex
.claude
61 changes: 54 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,63 @@
# fsprinter
Electron app to connect printers to FacturaScripts.
# FSPrinter
Electron app to connect printers to FacturaScripts a factura.city

## Run from source
```
## Installation

```bash
npm install
```

## Development

Run the application in development mode:

```bash
npm start
```

## Build executable
## Build

The project uses **electron-builder** to create distributable packages.

### Build for all platforms
```bash
npm run build
```
npm run make

### Build for specific platforms

**Linux** (deb, rpm, AppImage):
```bash
npm run build:linux
```

**Windows** (installer NSIS and portable):
```bash
npm run build:win
```

**macOS** (dmg and zip):
```bash
npm run build:mac
```

The compiled files will be generated in the `dist/` directory.

## macOS: "The application is damaged"

The macOS build is not signed with an Apple Developer ID, so Gatekeeper
blocks it after download with a misleading "damaged" message. Remove the
quarantine attribute to allow it to run:

```bash
xattr -dr com.apple.quarantine "/Applications/FSPrinter.app"
```

## Project Information

- **Version:** 1.4.1
- **Author:** Carlos García Gómez
- **License:** LGPL-3.0

## Contact or feedback
https://facturascripts.com/remote-printer
https://facturascripts.com/plugins/tickets
Loading