Skip to content

Workflow file for this run

name: Build the application
on:
push:
branches:
- main
- locale/*
- feature/*
- fix/*
paths-ignore:
- 'layout/**'
workflow_dispatch:
jobs:
build:
name: Generate Windows Release with Locale Files
runs-on: ${{ matrix.os }}
if: ${{ github.ref == 'refs/heads/main' || startsWith( github.ref, 'refs/heads/feature/' ) || startsWith( github.ref, 'refs/heads/fix/' ) }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest"]
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Python dependencies
run: pip install -r .\dependencies\requirements.txt pyinstaller
- name: Generate locale files
run: |
pyside6-lrelease -version
python3 .\src\i18n\gen_translation_files.py
python3 .\src\i18n\gen_translation_binaries.py
- name: Generate TSH Windows executable
run: |
set PYTHONUTF8=1
chcp 65001
set PYTHONIOENCODING=utf-8
python .\scripts\gen_contributors.py
pyinstaller --noconfirm .\dependencies\tsh.spec
copy dist\TSH.exe TSH.exe
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add TSH.exe .\src\i18n\*.ts
git commit -m "Update exe and locale files" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}