Branch Task #2
This file contains hidden or 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
| # TODO: REVERT ALL CHANGES TO THIS FILE PRIOR TO MERGING TO DEV | |
| # This file should be the empty stub from the branch-task PR commented out below | |
| # The job below is temporary for glossary translation generation only. | |
| # name: Branch Task | |
| # on: | |
| # workflow_dispatch: | |
| # jobs: | |
| # stub: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - run: echo "ok" | |
| name: Branch Task | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| generate-translations: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 360 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: glossary-term-extraction | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| - run: pnpm install --frozen-lockfile | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Generate glossary translations | |
| env: | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| run: npx tsx scripts/generate-translations-sdk.ts | |
| - name: Squash all translation commits into one | |
| run: | | |
| # Find the commit before the first translation commit | |
| BASE=$(git log --oneline --format="%H" -- scripts/translations/ | tail -1) | |
| PARENT=$(git log --oneline --format="%H" ${BASE}^ -1 2>/dev/null || echo "") | |
| if [ -n "$PARENT" ]; then | |
| echo "Squashing translation commits since $PARENT" | |
| git reset --soft $PARENT | |
| git add scripts/translations/ | |
| git commit -m "data: glossary translations (519 terms x 24 languages) | |
| Generated via Gemini 3.1 Pro Preview with @google/genai SDK. | |
| 16 concurrent streams, 10 terms per batch. | |
| Co-Authored-By: Gemini <noreply@google.com>" | |
| git push --force-with-lease | |
| else | |
| echo "No translation commits to squash" | |
| fi |