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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [ push, pull_request ]
on: [push, pull_request, workflow_call]

permissions:
contents: read
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
test:
name: Run tests
uses: Bzero/typstwriter/.github/workflows/ci.yml@master

build-macos-dmg:
needs: test
runs-on: macos-latest

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

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pyinstaller

- name: Build macOS app with PyInstaller
run: |
pyinstaller typstwriter.spec

- name: Install create-dmg
run: brew install create-dmg

- name: Create DMG
run: |
create-dmg \
--volname "Typstwriter" \
--window-pos 200 120 \
--window-size 600 400 \
--icon-size 100 \
--icon "typstwriter.app" 150 185 \
--app-drop-link 450 185 \
"typstwriter.dmg" \
"dist/typstwriter.app"

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
typstwriter.dmg
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
69 changes: 69 additions & 0 deletions typstwriter.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# -*- mode: python ; coding: utf-8 -*-

a = Analysis(
['typstwriter/typstwriter.py'],
pathex=[],
binaries=[],
datas=[
('typstwriter/icons', 'typstwriter/icons'),
],
hiddenimports=[
'qtpy',
'qtpy.QtCore',
'qtpy.QtWidgets',
'qtpy.QtGui',
'PySide6',
'PySide6.QtCore',
'PySide6.QtWidgets',
'PySide6.QtGui',
'PySide6.QtPrintSupport',
'typstwriter.logging',
'typstwriter.arguments',
'typstwriter.configuration',
'typstwriter.globalstate',
'typstwriter.mainwindow',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)

pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='typstwriter',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='typstwriter',
)

app = BUNDLE(
coll,
name='typstwriter.app',
icon=None,
bundle_identifier='net.posteo.b0.typstwriter',
)