Merge branch 'Wolfy76700-feature/alternate_game_detection' #671
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build the application | |
on: | |
push: | |
branches: | |
- main | |
- locale/* | |
- feature/* | |
- fix/* | |
paths-ignore: | |
- 'layout/**' | |
workflow_dispatch: | |
jobs: | |
locale_build: | |
name: Build locale files | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-24.04"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y libgstreamer-plugins-base1.0-dev | |
sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev-tools | |
lrelease -version | |
- run: pip install -r dependencies/requirements.txt pyinstaller | |
- run: | | |
python3 src/i18n/gen_translation_files.py | |
python3 src/i18n/gen_translation_binaries.py | |
- run: git pull | |
- name: commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add * | |
if ! git diff-index --quiet HEAD; then | |
git commit -m "Update locale files" -a | |
fi | |
- name: push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
build: | |
name: Generate Windows Release | |
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"] | |
needs: | |
- locale_build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- run: pip install -r dependencies/requirements.txt pyinstaller | |
- 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 | |
- run: git pull | |
- name: commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add TSH.exe | |
git commit -m "Update exe" -a | |
- name: push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ steps.extract_branch.outputs.branch }} |