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
125 changes: 125 additions & 0 deletions .github/workflows/desktop-exe-ext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Therp Timer Desktop Builds

on:
pull_request:
branches: [master]
paths:
- "dist/desktop/**"
- ".github/workflows/desktop.yml"
- "src/templates/**"
- "scripts/**"
push:
branches: [master]
tags:
- "v*"
paths:
- "dist/desktop/**"
- ".github/workflows/desktop.yml"
- "src/templates/**"
- "scripts/**"
workflow_dispatch:

jobs:
build-desktop:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux
build_cmd: npm run build:linux

- os: windows-latest
name: windows
build_cmd: npm run build:win

- os: macos-latest
name: macos
build_cmd: npm run build:mac

runs-on: ${{ matrix.os }}

defaults:
run:
working-directory: dist/desktop

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

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: dist/desktop/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build desktop app
run: ${{ matrix.build_cmd }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: "false"

- name: Prepare Linux portable bundle
if: matrix.name == 'linux'
run: |
APPIMAGE="$(find release -maxdepth 1 -name '*.AppImage' | head -n 1)"
mkdir -p portable/Therp-Timer
cp "$APPIMAGE" portable/Therp-Timer/
cp build/icon_512.png portable/Therp-Timer/icon.png

cat > portable/Therp-Timer/therp-timer.desktop <<EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=Therp Timer
Comment=Record time on project tasks
Exec=./$(basename "$APPIMAGE")
TryExec=./$(basename "$APPIMAGE")
Icon=./icon.png
Terminal=false
Categories=Office;ProjectManagement;
StartupNotify=true
StartupWMClass=therp-timer
EOF

- name: Upload Linux portable bundle
if: matrix.name == 'linux'
uses: actions/upload-artifact@v4
with:
name: desktop-linux-portable
path: dist/desktop/portable/Therp-Timer
if-no-files-found: error

# if you want single binary without desktop entry
# - name: Upload Linux AppImage
# if: matrix.name == 'linux'
# uses: actions/upload-artifact@v4
# with:
# name: desktop-linux-appimage
# path: dist/desktop/release/*.AppImage
# if-no-files-found: error

- name: Upload Windows artifacts
if: matrix.name == 'windows'
uses: actions/upload-artifact@v4
with:
name: desktop-windows
path: |
dist/desktop/release/*.exe
dist/desktop/release/*.msi
dist/desktop/release/*.zip
if-no-files-found: error

- name: Upload macOS artifacts
if: matrix.name == 'macos'
uses: actions/upload-artifact@v4
with:
name: desktop-macos
path: |
dist/desktop/release/*.dmg
dist/desktop/release/*.zip
if-no-files-found: error
49 changes: 31 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
# JetBrains IDE project files
# ─── IDE / editor ──────────────────────────────────────────────────────────────
.idea/
*.iml

# Visual Studio/VS Code
.vs/
.vscode/

# VS Code extension local history
.history/

# Python virtual environments and local tooling
# ─── Python virtual environments & tooling ─────────────────────────────────────
.nodeenv/
.tools-venv/
.venv/
venv/
env/

# Temporary build helpers
.tmp-owl-templates/

# Local Owl clone used for template compilation
/owl/

# Python compiled/cache files
__pycache__/
*.py[cod]
*$py.class

# Optional Python tool caches
.pytest_cache/
.mypy_cache/
.ruff_cache/
.coverage
htmlcov/

# macOS/Linux editor noise
.DS_Store
# ─── Node / npm ────────────────────────────────────────────────────────────────
node_modules/
npm-debug.log*
yarn-error.log*
.npm/

# Desktop app — local Node environment (created by scripts/setup.sh)
dist/desktop/.nodeenv/
dist/desktop/.tools-venv/
dist/desktop/node_modules/

# ─── Build artefacts ───────────────────────────────────────────────────────────
# Browser extensions — generated JS is committed so the ext can be used without
# a build step, but certain large or regenerated files are excluded.
dist/chrome/.gitignore
dist/firefox/.gitignore

# Desktop packaged releases
dist/desktop/release/

# ─── Temporary build helpers ───────────────────────────────────────────────────
.tmp-owl-templates/

# ─── Local OWL clone (used for template compilation) ──────────────────────────
/owl/

# ─── macOS / Linux editor noise ────────────────────────────────────────────────
.DS_Store
Thumbs.db
Loading
Loading