Skip to content

Commit

Permalink
Merge pull request #63 from kraanzu/develop
Browse files Browse the repository at this point in the history
fix: Lang addition in binaries
  • Loading branch information
eklairs authored Jan 27, 2024
2 parents c189e72 + 0badbcc commit 32ec55b
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 1,310 deletions.
117 changes: 31 additions & 86 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,96 +6,41 @@ on:

permissions:
contents: write
discussions: write

jobs:
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pyinstaller
- name: Package app with pyinstaller
run: |
python -c "with open('smassh.py', 'w') as f: f.write('from smassh.__init__ import main\nmain()\n')"
pyinstaller -F smassh.py --add-data="smassh/assets/languages/:smassh/assets/languages" --add-data="smassh/ui/css/:smassh/ui/css"
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: smassh-windows
path: ./dist/smassh.exe
- name: Rename final file
run: cp ./dist/smassh.exe ./dist/windows-smassh.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./dist/windows-smassh.exe
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]

linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pyinstaller
- name: Package app with pyinstaller
run: |
python -c "with open('smassh.py', 'w') as f: f.write('from smassh.__init__ import main\nmain()\n')"
pyinstaller -F smassh.py --add-data="smassh/assets/languages/:smassh/assets/languages" --add-data="smassh/ui/css/:smassh/ui/css"
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: smassh-linux
path: ./dist/smassh
- name: Rename final file
run: cp ./dist/smassh ./dist/linux-smassh
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./dist/linux-smassh
- uses: actions/checkout@v3

macOS-build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pyinstaller
- name: Package app with pyinstaller
run: |
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pyinstaller
- name: Package app with pyinstaller
run: |
python -c "with open('smassh.py', 'w') as f: f.write('from smassh.__init__ import main\nmain()\n')"
pyinstaller -F smassh.py --add-data="smassh/assets/languages/:smassh/assets/languages" --add-data="smassh/ui/css/:smassh/ui/css"
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: smassh-macos
path: ./dist/smassh
- name: Rename final file
run: cp ./dist/smassh ./dist/macos-smassh
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./dist/macos-smassh
pyinstaller -F smassh.py --add-data="smassh/ui/css/:smassh/ui/css"
- name: Set final file name
run: echo "FINAL_FILE_NAME=$(echo ${matrix.os} | sed 's/-latest//;s/ubuntu/linux/')-smassh"

- name: Rename final file
run: cp ./dist/smassh ./dist/${{ env.FINAL_FILE_NAME }}

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./dist/${{ env.FINAL_FILE_NAME }}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 3.0.2

## Added
- Language packs are now stored at user's local data dir
- The first startup might be slow because english lang pack is downloaded and added

## Fixed
- Language pack addition was not working for binaries

## 3.0.1

This new version completely changes the UI so can't really cover in a changelog but I'll \
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "smassh"
version = "3.0.1"
version = "3.0.2"
description = "A TUI based typing application"
maintainers = ["kraanzu <[email protected]>"]
license = "GPL v3"
Expand Down
207 changes: 0 additions & 207 deletions smassh/assets/languages/english.json

This file was deleted.

Loading

0 comments on commit 32ec55b

Please sign in to comment.