From 9485bdbfebb26633ca0c421bc87f5007a0405762 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 12 Sep 2024 16:05:01 +1000 Subject: [PATCH] feat: upload artefact for QA --- .../workflows/check_for_crowdin_updates.yml | 79 +++++++++++-------- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/.github/workflows/check_for_crowdin_updates.yml b/.github/workflows/check_for_crowdin_updates.yml index a9da474..5d360b2 100644 --- a/.github/workflows/check_for_crowdin_updates.yml +++ b/.github/workflows/check_for_crowdin_updates.yml @@ -25,7 +25,7 @@ jobs: with: repository: 'oxen-io/session-desktop' path: 'desktop' - ref: 'unstable' + ref: 'standardised_strings_qa_2' - name: Checkout iOS uses: actions/checkout@v4 with: @@ -64,12 +64,59 @@ jobs: "${{ github.workspace }}/raw_translations" \ "${{ github.workspace }}/desktop/_locales" \ "${{ github.workspace }}/desktop/ts/localization/constants.ts" + - name: Prepare QA strings + run: | + cd ${{ github.workspace }}/desktop/ + python ./tools/localization/generateLocales.py --generate-types --print-problems --print-problem-strings + cd - - name: Prepare iOS Strings run: | python "${{ github.workspace }}/scripts/crowdin/generate_ios_strings.py" \ "${{ github.workspace }}/raw_translations" \ "${{ github.workspace }}/ios/Session/Meta" \ "${{ github.workspace }}/ios/SessionUtilitiesKit/General/Constants.swift" + + - name: Upload Android artefacts + uses: actions/upload-artifact@v4 + with: + name: session-android-artefact + path: | + ${{ github.workspace }}/android/app/src/main/res/values*/strings.xml + ${{ github.workspace }}/android/session-android/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt + overwrite: true + if-no-files-found: warn + retention-days: 7 + - name: Upload Desktop artifacts + uses: actions/upload-artifact@v4 + with: + name: session-desktop-artifact + path: | + ${{ github.workspace }}/desktop/_locales + ${{ github.workspace }}/desktop/ts/localization/constants.ts + overwrite: true + if-no-files-found: warn + retention-days: 7 + - name: Upload iOS artefacts + uses: actions/upload-artifact@v4 + with: + name: session-ios-artifact + path: | + ${{ github.workspace }}/ios/Session/Meta/Localizable.xcstrings + ${{ github.workspace }}/ios/SessionUtilitiesKit/General/Constants.swift + overwrite: true + if-no-files-found: warn + retention-days: 7 + - name: Upload QA artefacts + uses: actions/upload-artifact@v4 + with: + name: session-qa-artifact + path: | + ${{ github.workspace }}/desktop/ts/localization/locales.ts + ${{ github.workspace }}/desktop/ts/localization/constants.ts + overwrite: true + if-no-files-found: warn + retention-days: 7 + - name: Create Android Pull Request uses: peter-evans/create-pull-request@v6 with: @@ -112,33 +159,3 @@ jobs: branch: feature/update-crowdin-translations commit-message: "[Automated] Update translations from Crowdin" delete-branch: true - - name: Upload Android artifacts - uses: actions/upload-artifact@v4 - with: - name: session-android-artifact - path: | - ${{ github.workspace }}/android/app/src/main/res/values*/strings.xml - ${{ github.workspace }}/android/session-android/libsession/src/main/java/org/session/libsession/utilities/NonTranslatableStringConstants.kt - overwrite: true - if-no-files-found: warn - retention-days: 7 - - name: Upload Desktop artifacts - uses: actions/upload-artifact@v4 - with: - name: session-desktop-artifact - path: | - ${{ github.workspace }}/desktop/_locales - ${{ github.workspace }}/desktop/ts/localization/constants.ts - overwrite: true - if-no-files-found: warn - retention-days: 7 - - name: Upload iOS artifacts - uses: actions/upload-artifact@v4 - with: - name: session-ios-artifact - path: | - ${{ github.workspace }}/ios/Session/Meta/Localizable.xcstrings - ${{ github.workspace }}/ios/SessionUtilitiesKit/General/Constants.swift - overwrite: true - if-no-files-found: warn - retention-days: 7