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
|
2022-11-23 17:58:41 +00:00
|
|
|
# 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')
|
2022-11-26 10:53:59 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-06-28 12:19:03 +01:00
|
|
|
timeout-minutes: 15
|
|
|
|
|
|
|
|
steps:
|
2022-11-26 10:53:59 +00:00
|
|
|
- name: Install Qt 5 packages
|
2022-06-28 12:19:03 +01:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-02-08 17:31:54 +00:00
|
|
|
sudo apt-get update
|
2022-11-26 10:53:59 +00:00
|
|
|
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@v3
|
|
|
|
|
|
|
|
- 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
|
2022-10-15 09:55:53 +01:00
|
|
|
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
|
2022-11-23 17:58:41 +00:00
|
|
|
# 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@v3
|
|
|
|
|
|
|
|
- name: Setup msbuild
|
2022-12-20 09:03:32 +00:00
|
|
|
uses: microsoft/setup-msbuild@v1.3
|
2022-06-28 12:19:03 +01:00
|
|
|
|
|
|
|
- name: Build Sandboxie 64 bit
|
|
|
|
# This is needed to compile Parse.vcxproj
|
|
|
|
run: |
|
|
|
|
msbuild /t:build Sandboxie\Sandbox.sln /p:Configuration="SbieRelease" /p:Platform=x64 -maxcpucount:8
|
|
|
|
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
|
|
|
|
|
2022-09-30 16:21:24 +01:00
|
|
|
- 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
|
2022-09-30 16:21:24 +01:00
|
|
|
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"
|