Sandboxie/.github/workflows/lupdate.yml

91 lines
2.9 KiB
YAML
Raw Normal View History

2022-06-28 12:19:03 +01:00
name: Update language files
on:
workflow_dispatch:
schedule:
2022-07-13 23:26:50 +01:00
# runs every night
2022-07-14 07:17:28 +01:00
- cron: '0 1 * * *'
2022-06-28 12:19:03 +01:00
jobs:
SBIE_Plus_lupdate:
2022-07-04 11:20:47 +01:00
name: SBIE Plus lupdate
# Skip the job on forks
2022-06-28 12:19:03 +01:00
if: (github.event_name == 'schedule' && github.repository_owner == 'sandboxie-plus') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
2022-06-28 12:19:03 +01:00
timeout-minutes: 15
steps:
- name: Install Qt 5 packages
2022-06-28 12:19:03 +01:00
shell: bash
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends qtbase5-dev qttools5-dev-tools
2022-06-28 12:19:03 +01:00
- name: Checkout repo
uses: actions/checkout@v4
2022-06-28 12:19:03 +01:00
- name: Sync Sbie Plus language strings (.ts files)
id: check
shell: bash
working-directory: SandboxiePlus/SandMan
run: |
set +e
lupdate SandMan.pri
git diff --exit-code
echo "deploy=$?" >> $GITHUB_OUTPUT
2022-06-28 12:19:03 +01:00
- name: Commit translations changes (if any)
if: steps.check.outputs.deploy == '1'
shell: bash
run: |
2022-07-11 09:11:54 +01:00
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
2022-06-28 12:19:03 +01:00
git add -A
git commit -m "Sync SBIE Plus language files (lupdate)"
git pull --rebase=merges
git push
deploy_commit=$(git rev-parse HEAD)
echo "Created commit: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$deploy_commit"
SBIE_reports:
2022-07-04 11:20:47 +01:00
name: SBIE reports
# Skip the job on forks
2022-06-28 12:19:03 +01:00
if: (github.event_name == 'schedule' && github.repository_owner == 'sandboxie-plus') || (github.event_name != 'schedule')
runs-on: windows-2019
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@v4
2022-06-28 12:19:03 +01:00
- name: Setup msbuild
uses: microsoft/setup-msbuild@v2
2022-06-28 12:19:03 +01:00
- name: Build Sandboxie x86
# This step is needed to compile Parse.vcxproj
2022-06-28 12:19:03 +01:00
run: |
msbuild /t:build Sandboxie\Sandbox.sln /p:Configuration="SbieRelease" /p:Platform=Win32 -maxcpucount:8
2022-06-28 12:19:03 +01:00
cd Sandboxie/msgs/SbieRelease
copy Parse.exe ../
- name: Check new Sbie strings found in Sbie-English-1033.txt
id: check2
shell: cmd
working-directory: Sandboxie/msgs
run: |
.\RunReport.bat
- name: Commit updated strings in Sandboxie/msgs/report
2022-06-28 12:19:03 +01:00
shell: bash
run: |
2022-07-04 11:20:47 +01:00
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git clean -f -x
git add -u Sandboxie/msgs/report/Report-*.txt
git diff-index --quiet --cached HEAD || git commit -m "Update SBIE language reports (RunReport)"
2022-06-28 12:19:03 +01:00
git pull --rebase=merges
git push
deploy2_commit=$(git rev-parse HEAD)
echo "Created commit: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$deploy2_commit"