Adjust Adobe Air SDK v5 #1533
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: Fix translations | |
on: | |
pull_request: | |
jobs: | |
i18n-fixes: | |
name: Fix translated files | |
runs-on: ubuntu-latest | |
if: startsWith(github.head_ref, 'smartling') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.ADJUST_NPM_TOKEN }} | |
steps: | |
- name: Checkout the latest commit | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
# Install Poetry | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "poetry" | |
# Install dependencies using Poetry | |
- name: Install dependencies with Poetry | |
working-directory: .github/scripts | |
run: | | |
poetry install | |
# Run the script using Poetry | |
- name: Run translation fixes script with Poetry | |
working-directory: .github/scripts | |
run: | | |
poetry run python fix_i18n.py | |
# Check for modified files | |
- name: Check for modified files | |
id: git-check | |
run: echo "MODIFIED=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> "$GITHUB_OUTPUT" | |
# Set up Node if files were modified | |
- name: Set up node | |
if: ${{ steps.git-check.outputs.MODIFIED == 'true' }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
registry-url: https://npm.pkg.github.com/ | |
scope: "@adjust" | |
# Install npm dependencies if files were modified | |
- name: Install dependencies | |
if: ${{ steps.git-check.outputs.MODIFIED == 'true' }} | |
run: npm i | |
# Commit and push changes if any files were modified | |
- name: Commit changes | |
if: ${{ steps.git-check.outputs.MODIFIED == 'true' }} | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git commit -am "Fix translated files" | |
git push |